@@ -60,7 +60,9 @@ describe('Printer: Query document', () => {
60
60
'query ($foo: TestType) @testDirective { id, name }' ,
61
61
) ;
62
62
expect ( print ( queryAstWithArtifacts ) ) . to . equal ( dedent `
63
- query ($foo: TestType) @testDirective {
63
+ query (
64
+ $foo: TestType
65
+ ) @testDirective {
64
66
id
65
67
name
66
68
}
@@ -70,7 +72,9 @@ describe('Printer: Query document', () => {
70
72
'mutation ($foo: TestType) @testDirective { id, name }' ,
71
73
) ;
72
74
expect ( print ( mutationAstWithArtifacts ) ) . to . equal ( dedent `
73
- mutation ($foo: TestType) @testDirective {
75
+ mutation (
76
+ $foo: TestType
77
+ ) @testDirective {
74
78
id
75
79
name
76
80
}
@@ -82,7 +86,9 @@ describe('Printer: Query document', () => {
82
86
'query ($foo: TestType = {a: 123} @testDirective(if: true) @test) { id }' ,
83
87
) ;
84
88
expect ( print ( queryAstWithVariableDirective ) ) . to . equal ( dedent `
85
- query ($foo: TestType = {a: 123} @testDirective(if: true) @test) {
89
+ query (
90
+ $foo: TestType = {a: 123} @testDirective(if: true) @test
91
+ ) {
86
92
id
87
93
}
88
94
` ) ;
@@ -96,7 +102,9 @@ describe('Printer: Query document', () => {
96
102
} ,
97
103
) ;
98
104
expect ( print ( queryAstWithVariableDirective ) ) . to . equal ( dedent `
99
- fragment Foo($foo: TestType @test) on TestType @testDirective {
105
+ fragment Foo(
106
+ $foo: TestType @test
107
+ ) on TestType @testDirective {
100
108
id
101
109
}
102
110
` ) ;
@@ -157,24 +165,16 @@ describe('Printer: Query document', () => {
157
165
fragment Foo($a: ComplexType, $b: Boolean = false) on TestType {
158
166
id
159
167
}
160
-
161
- fragment Simple($a: Boolean = true) on TestType {
162
- id
163
- }
164
168
` ,
165
169
{ experimentalFragmentVariables : true } ,
166
170
) ;
167
171
expect ( print ( fragmentWithVariable ) ) . to . equal ( dedent `
168
172
fragment Foo(
169
- $a: ComplexType,
173
+ $a: ComplexType
170
174
$b: Boolean = false
171
175
) on TestType {
172
176
id
173
177
}
174
-
175
- fragment Simple($a: Boolean = true) on TestType {
176
- id
177
- }
178
178
` ) ;
179
179
} ) ;
180
180
@@ -186,7 +186,7 @@ describe('Printer: Query document', () => {
186
186
expect ( printed ) . to . equal (
187
187
dedent ( String . raw `
188
188
query queryName(
189
- $foo: ComplexType,
189
+ $foo: ComplexType
190
190
$site: Site = MOBILE
191
191
) @onQuery {
192
192
whoever123is: node(id: [123, 456]) {
@@ -217,7 +217,9 @@ describe('Printer: Query document', () => {
217
217
}
218
218
}
219
219
220
- subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) @onSubscription {
220
+ subscription StoryLikeSubscription(
221
+ $input: StoryLikeSubscribeInput
222
+ ) @onSubscription {
221
223
storyLikeSubscribe(input: $input) {
222
224
story {
223
225
likers {
0 commit comments