File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed
pocs/obfuscated-endpoint-url Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ query Customer ($id : ID ! ) {
2
+ customer (id : $id ) {
3
+ id
4
+ name
5
+ email
6
+ address {
7
+ city
8
+ zip
9
+ }
10
+ }
11
+ }
Original file line number Diff line number Diff line change
1
+ const fs = require ( "fs" ) ;
2
+ const path = require ( "node:path" ) ;
3
+
4
+ const {
5
+ deployAndRun,
6
+ getTestDescription,
7
+ } = require ( "../../../tests/gqltest.js" ) ;
8
+
9
+ testDescription = getTestDescription ( "snippets" , __dirname ) ;
10
+
11
+ const requestsFile = path . join ( path . dirname ( __dirname ) , "operations.graphql" ) ;
12
+ const requests = fs . readFileSync ( requestsFile , "utf8" ) . toString ( ) ;
13
+
14
+ describe ( testDescription , function ( ) {
15
+ const tests = [
16
+ {
17
+ label : "customer" ,
18
+ query : requests ,
19
+ operationName : "Customer" ,
20
+ variables : {
21
+ id : 1238 ,
22
+ } ,
23
+ expected : {
24
+ customer : {
25
+ id : "1238" ,
26
+ name : "Baumbach" ,
27
+
28
+ address : {
29
+ city : "New Schroeder" ,
30
+ zip : "36897" ,
31
+ } ,
32
+ } ,
33
+ } ,
34
+ } ,
35
+ ] ;
36
+ return deployAndRun ( __dirname , tests ) ;
37
+ } ) ;
You can’t perform that action at this time.
0 commit comments