File tree Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Expand file tree Collapse file tree 3 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -645,8 +645,7 @@ exports[`parse > parses the kitchen sink document like graphql.js does 1`] = `
645
645
" value" : {
646
646
" block" : true ,
647
647
" kind" : " StringValue" ,
648
- " value" : " block string uses " " "
649
- " ,
648
+ " value" : " block string uses " " " " ,
650
649
},
651
650
},
652
651
],
Original file line number Diff line number Diff line change @@ -188,11 +188,10 @@ export type FragmentSpreadNode = Or<
188
188
{
189
189
readonly kind : Kind . FRAGMENT_SPREAD ;
190
190
readonly name : NameNode ;
191
- readonly arguments ?: ReadonlyArray < ArgumentNode > ;
192
191
readonly directives ?: ReadonlyArray < DirectiveNode > ;
193
192
readonly loc ?: Location ;
194
193
}
195
- > ;
194
+ > & { readonly arguments ?: ReadonlyArray < ArgumentNode > } ;
196
195
197
196
export type InlineFragmentNode = Or <
198
197
GraphQL . InlineFragmentNode ,
Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ const nodes: {
97
97
} ,
98
98
FragmentSpread ( node ) {
99
99
let out = '...' + node . name . value ;
100
- if ( hasItems ( node . arguments ) ) out += '(' + node . arguments . map ( nodes . Argument ! ) . join ( ', ' ) + ')' ;
100
+ if ( 'arguments' in node && Array . isArray ( node . arguments ) && hasItems ( node . arguments ) )
101
+ out += '(' + node . arguments . map ( nodes . Argument ! ) . join ( ', ' ) + ')' ;
101
102
if ( hasItems ( node . directives ) ) out += ' ' + node . directives . map ( nodes . Directive ! ) . join ( ' ' ) ;
102
103
return out ;
103
104
} ,
You can’t perform that action at this time.
0 commit comments