File tree Expand file tree Collapse file tree 1 file changed +36
-21
lines changed Expand file tree Collapse file tree 1 file changed +36
-21
lines changed Original file line number Diff line number Diff line change @@ -233,29 +233,44 @@ describe('parse', () => {
233
233
} ) ;
234
234
235
235
it ( 'parses fragment spread arguments' , ( ) => {
236
- expect (
237
- parse ( 'query x { ...x(var: 2) } fragment x($var: Int = 1) on Type { field }' ) . definitions [ 0 ]
238
- ) . toHaveProperty ( 'selectionSet.selections.0' , {
239
- kind : Kind . FRAGMENT_SPREAD ,
240
- directives : undefined ,
241
- name : {
242
- kind : Kind . NAME ,
243
- value : 'x' ,
244
- } ,
245
- arguments : [
246
- {
247
- kind : 'Argument' ,
248
- name : {
249
- kind : 'Name' ,
250
- value : 'var' ,
236
+ expect ( parse ( 'query x { ...x(varA: 2, varB: $var) }' ) . definitions [ 0 ] ) . toHaveProperty (
237
+ 'selectionSet.selections.0' ,
238
+ {
239
+ kind : Kind . FRAGMENT_SPREAD ,
240
+ directives : undefined ,
241
+ name : {
242
+ kind : Kind . NAME ,
243
+ value : 'x' ,
244
+ } ,
245
+ arguments : [
246
+ {
247
+ kind : 'Argument' ,
248
+ name : {
249
+ kind : 'Name' ,
250
+ value : 'varA' ,
251
+ } ,
252
+ value : {
253
+ kind : 'IntValue' ,
254
+ value : '2' ,
255
+ } ,
251
256
} ,
252
- value : {
253
- kind : 'IntValue' ,
254
- value : '2' ,
257
+ {
258
+ kind : 'Argument' ,
259
+ name : {
260
+ kind : 'Name' ,
261
+ value : 'varB' ,
262
+ } ,
263
+ value : {
264
+ kind : 'Variable' ,
265
+ name : {
266
+ kind : 'Name' ,
267
+ value : 'var' ,
268
+ } ,
269
+ } ,
255
270
} ,
256
- } ,
257
- ] ,
258
- } ) ;
271
+ ] ,
272
+ }
273
+ ) ;
259
274
} ) ;
260
275
261
276
it ( 'parses fields' , ( ) => {
You can’t perform that action at this time.
0 commit comments