@@ -60,7 +60,9 @@ describe('Printer: Query document', () => {
6060 'query ($foo: TestType) @testDirective { id, name }' ,
6161 ) ;
6262 expect ( print ( queryAstWithArtifacts ) ) . to . equal ( dedent `
63- query ($foo: TestType) @testDirective {
63+ query (
64+ $foo: TestType
65+ ) @testDirective {
6466 id
6567 name
6668 }
@@ -70,7 +72,9 @@ describe('Printer: Query document', () => {
7072 'mutation ($foo: TestType) @testDirective { id, name }' ,
7173 ) ;
7274 expect ( print ( mutationAstWithArtifacts ) ) . to . equal ( dedent `
73- mutation ($foo: TestType) @testDirective {
75+ mutation (
76+ $foo: TestType
77+ ) @testDirective {
7478 id
7579 name
7680 }
@@ -82,7 +86,9 @@ describe('Printer: Query document', () => {
8286 'query ($foo: TestType = {a: 123} @testDirective(if: true) @test) { id }' ,
8387 ) ;
8488 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+ ) {
8692 id
8793 }
8894 ` ) ;
@@ -96,7 +102,9 @@ describe('Printer: Query document', () => {
96102 } ,
97103 ) ;
98104 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 {
100108 id
101109 }
102110 ` ) ;
@@ -157,24 +165,16 @@ describe('Printer: Query document', () => {
157165 fragment Foo($a: ComplexType, $b: Boolean = false) on TestType {
158166 id
159167 }
160-
161- fragment Simple($a: Boolean = true) on TestType {
162- id
163- }
164168 ` ,
165169 { experimentalFragmentVariables : true } ,
166170 ) ;
167171 expect ( print ( fragmentWithVariable ) ) . to . equal ( dedent `
168172 fragment Foo(
169- $a: ComplexType,
173+ $a: ComplexType
170174 $b: Boolean = false
171175 ) on TestType {
172176 id
173177 }
174-
175- fragment Simple($a: Boolean = true) on TestType {
176- id
177- }
178178 ` ) ;
179179 } ) ;
180180
@@ -186,7 +186,7 @@ describe('Printer: Query document', () => {
186186 expect ( printed ) . to . equal (
187187 dedent ( String . raw `
188188 query queryName(
189- $foo: ComplexType,
189+ $foo: ComplexType
190190 $site: Site = MOBILE
191191 ) @onQuery {
192192 whoever123is: node(id: [123, 456]) {
@@ -217,7 +217,9 @@ describe('Printer: Query document', () => {
217217 }
218218 }
219219
220- subscription StoryLikeSubscription($input: StoryLikeSubscribeInput) @onSubscription {
220+ subscription StoryLikeSubscription(
221+ $input: StoryLikeSubscribeInput
222+ ) @onSubscription {
221223 storyLikeSubscribe(input: $input) {
222224 story {
223225 likers {
0 commit comments