@@ -163,7 +163,7 @@ function runTests(server: Server) {
163
163
164
164
const response = await app . request ( ) . get (
165
165
urlString ( {
166
- query : '{test}' ,
166
+ query : '{ test }' ,
167
167
} ) ,
168
168
) ;
169
169
@@ -529,7 +529,7 @@ function runTests(server: Server) {
529
529
530
530
const response = await app . request ( ) . get (
531
531
urlString ( {
532
- query : '{test}' ,
532
+ query : '{ test }' ,
533
533
} ) ,
534
534
) ;
535
535
@@ -555,7 +555,7 @@ function runTests(server: Server) {
555
555
556
556
const response = await app . request ( ) . get (
557
557
urlString ( {
558
- query : '{test}' ,
558
+ query : '{ test }' ,
559
559
} ) ,
560
560
) ;
561
561
@@ -564,7 +564,7 @@ function runTests(server: Server) {
564
564
expect ( seenRequest ) . to . not . equal ( null ) ;
565
565
expect ( seenResponse ) . to . not . equal ( null ) ;
566
566
expect ( seenParams ) . to . deep . equal ( {
567
- query : '{test}' ,
567
+ query : '{ test }' ,
568
568
operationName : null ,
569
569
variables : null ,
570
570
raw : false ,
@@ -583,7 +583,7 @@ function runTests(server: Server) {
583
583
584
584
const response = await app . request ( ) . get (
585
585
urlString ( {
586
- query : '{test}' ,
586
+ query : '{ test }' ,
587
587
} ) ,
588
588
) ;
589
589
@@ -608,7 +608,7 @@ function runTests(server: Server) {
608
608
const response = await app
609
609
. request ( )
610
610
. post ( urlString ( ) )
611
- . send ( { query : '{test}' } ) ;
611
+ . send ( { query : '{ test }' } ) ;
612
612
613
613
expect ( response . text ) . to . equal ( '{"data":{"test":"Hello World"}}' ) ;
614
614
} ) ;
@@ -642,7 +642,7 @@ function runTests(server: Server) {
642
642
const response = await app
643
643
. request ( )
644
644
. post ( urlString ( ) )
645
- . send ( stringifyURLParams ( { query : '{test}' } ) ) ;
645
+ . send ( stringifyURLParams ( { query : '{ test }' } ) ) ;
646
646
647
647
expect ( response . text ) . to . equal ( '{"data":{"test":"Hello World"}}' ) ;
648
648
} ) ;
@@ -795,13 +795,13 @@ function runTests(server: Server) {
795
795
796
796
const response = await app . request ( ) . post ( urlString ( ) ) . send ( {
797
797
query : `
798
- query helloYou { test(who: "You"), ...shared }
799
- query helloWorld { test(who: "World"), ...shared }
800
- query helloDolly { test(who: "Dolly"), ...shared }
801
- fragment shared on QueryRoot {
802
- shared: test(who: "Everyone")
803
- }
804
- ` ,
798
+ query helloYou { test(who: "You"), ...shared }
799
+ query helloWorld { test(who: "World"), ...shared }
800
+ query helloDolly { test(who: "Dolly"), ...shared }
801
+ fragment shared on QueryRoot {
802
+ shared: test(who: "Everyone")
803
+ }
804
+ ` ,
805
805
operationName : 'helloWorld' ,
806
806
} ) ;
807
807
@@ -958,8 +958,8 @@ function runTests(server: Server) {
958
958
. field (
959
959
'query' ,
960
960
`mutation TestMutation {
961
- uploadFile { originalname, mimetype }
962
- }` ,
961
+ uploadFile { originalname, mimetype }
962
+ }` ,
963
963
)
964
964
. attach ( 'file' , Buffer . from ( 'test' ) , 'test.txt' ) ;
965
965
@@ -1043,7 +1043,7 @@ function runTests(server: Server) {
1043
1043
1044
1044
const response = await app . request ( ) . get (
1045
1045
urlString ( {
1046
- query : '{test}' ,
1046
+ query : '{ test }' ,
1047
1047
} ) ,
1048
1048
) ;
1049
1049
@@ -1074,7 +1074,7 @@ function runTests(server: Server) {
1074
1074
pretty = undefined ;
1075
1075
const defaultResponse = await app . request ( ) . get (
1076
1076
urlString ( {
1077
- query : '{test}' ,
1077
+ query : '{ test }' ,
1078
1078
} ) ,
1079
1079
) ;
1080
1080
@@ -1083,7 +1083,7 @@ function runTests(server: Server) {
1083
1083
pretty = true ;
1084
1084
const prettyResponse = await app . request ( ) . get (
1085
1085
urlString ( {
1086
- query : '{test}' ,
1086
+ query : '{ test }' ,
1087
1087
pretty : '1' ,
1088
1088
} ) ,
1089
1089
) ;
@@ -1102,7 +1102,7 @@ function runTests(server: Server) {
1102
1102
pretty = false ;
1103
1103
const unprettyResponse = await app . request ( ) . get (
1104
1104
urlString ( {
1105
- query : '{test}' ,
1105
+ query : '{ test }' ,
1106
1106
pretty : '0' ,
1107
1107
} ) ,
1108
1108
) ;
@@ -1126,7 +1126,7 @@ function runTests(server: Server) {
1126
1126
} ) ,
1127
1127
) ;
1128
1128
1129
- await app . request ( ) . get ( urlString ( { query : '{test}' } ) ) ;
1129
+ await app . request ( ) . get ( urlString ( { query : '{ test }' } ) ) ;
1130
1130
1131
1131
expect ( seenRequest ) . to . not . equal ( undefined ) ;
1132
1132
expect ( seenResponse ) . to . not . equal ( undefined ) ;
@@ -1145,7 +1145,7 @@ function runTests(server: Server) {
1145
1145
1146
1146
const response = await app . request ( ) . get (
1147
1147
urlString ( {
1148
- query : '{thrower}' ,
1148
+ query : '{ thrower }' ,
1149
1149
} ) ,
1150
1150
) ;
1151
1151
@@ -1155,7 +1155,7 @@ function runTests(server: Server) {
1155
1155
errors : [
1156
1156
{
1157
1157
message : 'Throws!' ,
1158
- locations : [ { line : 1 , column : 2 } ] ,
1158
+ locations : [ { line : 1 , column : 3 } ] ,
1159
1159
path : [ 'thrower' ] ,
1160
1160
} ,
1161
1161
] ,
@@ -1217,7 +1217,7 @@ function runTests(server: Server) {
1217
1217
1218
1218
const response = await app . request ( ) . get (
1219
1219
urlString ( {
1220
- query : '{thrower}' ,
1220
+ query : '{ thrower }' ,
1221
1221
} ) ,
1222
1222
) ;
1223
1223
@@ -1279,7 +1279,7 @@ function runTests(server: Server) {
1279
1279
1280
1280
const response = await app . request ( ) . get (
1281
1281
urlString ( {
1282
- query : '{thrower}' ,
1282
+ query : '{ thrower }' ,
1283
1283
} ) ,
1284
1284
) ;
1285
1285
@@ -1289,7 +1289,7 @@ function runTests(server: Server) {
1289
1289
errors : [
1290
1290
{
1291
1291
message : 'Throws!' ,
1292
- locations : [ { line : 1 , column : 2 } ] ,
1292
+ locations : [ { line : 1 , column : 3 } ] ,
1293
1293
stack : 'Stack trace' ,
1294
1294
} ,
1295
1295
] ,
@@ -1645,7 +1645,9 @@ function runTests(server: Server) {
1645
1645
1646
1646
app . put ( urlString ( ) , graphqlHTTP ( { schema : TestSchema } ) ) ;
1647
1647
1648
- const response = await app . request ( ) . put ( urlString ( { query : '{test}' } ) ) ;
1648
+ const response = await app
1649
+ . request ( )
1650
+ . put ( urlString ( { query : '{ test }' } ) ) ;
1649
1651
1650
1652
expect ( response . status ) . to . equal ( 405 ) ;
1651
1653
expect ( response . get ( 'allow' ) ) . to . equal ( 'GET, POST' ) ;
@@ -1663,7 +1665,7 @@ function runTests(server: Server) {
1663
1665
1664
1666
const response = await app
1665
1667
. request ( )
1666
- . get ( urlString ( { query : '{test}' } ) )
1668
+ . get ( urlString ( { query : '{ test }' } ) )
1667
1669
. set ( 'Accept' , 'text/html' ) ;
1668
1670
1669
1671
expect ( response . status ) . to . equal ( 200 ) ;
@@ -1684,12 +1686,12 @@ function runTests(server: Server) {
1684
1686
1685
1687
const response = await app
1686
1688
. request ( )
1687
- . get ( urlString ( { query : '{test}' } ) )
1689
+ . get ( urlString ( { query : '{ test }' } ) )
1688
1690
. set ( 'Accept' , 'text/html' ) ;
1689
1691
1690
1692
expect ( response . status ) . to . equal ( 200 ) ;
1691
1693
expect ( response . type ) . to . equal ( 'text/html' ) ;
1692
- expect ( response . text ) . to . include ( '{test}' ) ;
1694
+ expect ( response . text ) . to . include ( '{ test }' ) ;
1693
1695
expect ( response . text ) . to . include ( 'graphiql.min.js' ) ;
1694
1696
} ) ;
1695
1697
@@ -1729,7 +1731,7 @@ function runTests(server: Server) {
1729
1731
1730
1732
const response = await app
1731
1733
. request ( )
1732
- . get ( urlString ( { query : '{test}' } ) )
1734
+ . get ( urlString ( { query : '{ test }' } ) )
1733
1735
. set ( 'Accept' , 'text/html' ) ;
1734
1736
1735
1737
expect ( response . status ) . to . equal ( 200 ) ;
@@ -1918,7 +1920,7 @@ function runTests(server: Server) {
1918
1920
1919
1921
const response = await app
1920
1922
. request ( )
1921
- . get ( urlString ( { query : '{test}' } ) )
1923
+ . get ( urlString ( { query : '{ test }' } ) )
1922
1924
. set ( 'Accept' , 'text/html,application/json' ) ;
1923
1925
1924
1926
expect ( response . status ) . to . equal ( 200 ) ;
@@ -1939,7 +1941,7 @@ function runTests(server: Server) {
1939
1941
1940
1942
const response = await app
1941
1943
. request ( )
1942
- . get ( urlString ( { query : '{test}' } ) )
1944
+ . get ( urlString ( { query : '{ test }' } ) )
1943
1945
. set ( 'Accept' , 'application/json,text/html' ) ;
1944
1946
1945
1947
expect ( response . status ) . to . equal ( 200 ) ;
@@ -1960,7 +1962,7 @@ function runTests(server: Server) {
1960
1962
1961
1963
const response = await app
1962
1964
. request ( )
1963
- . get ( urlString ( { query : '{test}' } ) )
1965
+ . get ( urlString ( { query : '{ test }' } ) )
1964
1966
. set ( 'Accept' , 'unknown' ) ;
1965
1967
1966
1968
expect ( response . status ) . to . equal ( 200 ) ;
@@ -1981,7 +1983,7 @@ function runTests(server: Server) {
1981
1983
1982
1984
const response = await app
1983
1985
. request ( )
1984
- . get ( urlString ( { query : '{test}' , raw : '' } ) )
1986
+ . get ( urlString ( { query : '{ test }' , raw : '' } ) )
1985
1987
. set ( 'Accept' , 'text/html' ) ;
1986
1988
1987
1989
expect ( response . status ) . to . equal ( 200 ) ;
@@ -2061,7 +2063,7 @@ function runTests(server: Server) {
2061
2063
2062
2064
const response = await app
2063
2065
. request ( )
2064
- . get ( urlString ( { query : '{test}' , raw : '' } ) )
2066
+ . get ( urlString ( { query : '{ test }' , raw : '' } ) )
2065
2067
. set ( 'Accept' , 'text/html' ) ;
2066
2068
2067
2069
expect ( response . status ) . to . equal ( 200 ) ;
@@ -2085,7 +2087,7 @@ function runTests(server: Server) {
2085
2087
2086
2088
const response = await app . request ( ) . get (
2087
2089
urlString ( {
2088
- query : '{thrower}' ,
2090
+ query : '{ thrower }' ,
2089
2091
} ) ,
2090
2092
) ;
2091
2093
@@ -2127,7 +2129,7 @@ function runTests(server: Server) {
2127
2129
2128
2130
const response = await app . request ( ) . get (
2129
2131
urlString ( {
2130
- query : '{thrower}' ,
2132
+ query : '{ thrower }' ,
2131
2133
} ) ,
2132
2134
) ;
2133
2135
@@ -2166,7 +2168,9 @@ function runTests(server: Server) {
2166
2168
} ) ) ,
2167
2169
) ;
2168
2170
2169
- const response = await app . request ( ) . get ( urlString ( { query : '{test}' } ) ) ;
2171
+ const response = await app
2172
+ . request ( )
2173
+ . get ( urlString ( { query : '{ test }' } ) ) ;
2170
2174
2171
2175
expect ( response . text ) . to . equal (
2172
2176
'{"data":{"test":"Hello World","test2":"Modification"}}' ,
@@ -2187,7 +2191,9 @@ function runTests(server: Server) {
2187
2191
} ) ) ,
2188
2192
) ;
2189
2193
2190
- const response = await app . request ( ) . get ( urlString ( { query : '{test}' } ) ) ;
2194
+ const response = await app
2195
+ . request ( )
2196
+ . get ( urlString ( { query : '{ test }' } ) ) ;
2191
2197
2192
2198
expect ( response . status ) . to . equal ( 400 ) ;
2193
2199
expect ( response . text ) . to . equal (
@@ -2208,7 +2214,7 @@ function runTests(server: Server) {
2208
2214
schema : TestSchema ,
2209
2215
customParseFn ( args ) {
2210
2216
seenParseArgs = args ;
2211
- return parse ( new Source ( '{test}' , 'Custom parse function' ) ) ;
2217
+ return parse ( new Source ( '{ test }' , 'Custom parse function' ) ) ;
2212
2218
} ,
2213
2219
} ) ) ,
2214
2220
) ;
@@ -2257,7 +2263,7 @@ function runTests(server: Server) {
2257
2263
2258
2264
const response = await app
2259
2265
. request ( )
2260
- . get ( urlString ( { query : '{test}' , raw : '' } ) )
2266
+ . get ( urlString ( { query : '{ test }' , raw : '' } ) )
2261
2267
. set ( 'Accept' , 'text/html' ) ;
2262
2268
2263
2269
expect ( response . status ) . to . equal ( 200 ) ;
@@ -2285,7 +2291,7 @@ function runTests(server: Server) {
2285
2291
2286
2292
const response = await app . request ( ) . get (
2287
2293
urlString ( {
2288
- query : '{thrower}' ,
2294
+ query : '{ thrower }' ,
2289
2295
} ) ,
2290
2296
) ;
2291
2297
@@ -2299,7 +2305,7 @@ function runTests(server: Server) {
2299
2305
errors : [
2300
2306
{
2301
2307
message : 'Throws!' ,
2302
- locations : [ { line : 1 , column : 2 } ] ,
2308
+ locations : [ { line : 1 , column : 3 } ] ,
2303
2309
path : [ 'thrower' ] ,
2304
2310
} ,
2305
2311
] ,
@@ -2324,7 +2330,7 @@ function runTests(server: Server) {
2324
2330
2325
2331
const response = await app
2326
2332
. request ( )
2327
- . get ( urlString ( { query : '{test}' , raw : '' } ) )
2333
+ . get ( urlString ( { query : '{ test }' , raw : '' } ) )
2328
2334
. set ( 'Accept' , 'text/html' ) ;
2329
2335
2330
2336
expect ( response . status ) . to . equal ( 200 ) ;
@@ -2348,7 +2354,7 @@ function runTests(server: Server) {
2348
2354
2349
2355
const response = await app
2350
2356
. request ( )
2351
- . get ( urlString ( { query : '{test}' , raw : '' } ) )
2357
+ . get ( urlString ( { query : '{ test }' , raw : '' } ) )
2352
2358
. set ( 'Accept' , 'text/html' ) ;
2353
2359
2354
2360
expect ( response . status ) . to . equal ( 200 ) ;
0 commit comments