Skip to content

Commit a474716

Browse files
committed
Add flag for parser
1 parent 9c17ca1 commit a474716

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

src/__testUtils__/kitchenSinkQuery.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ query queryName($foo: ComplexType, $site: Site = MOBILE) @onQuery {
1010
...frag @onFragmentSpread
1111
}
1212
}
13-
13+
1414
field3!
1515
field4?
1616
requiredField5: field5!

src/execution/__tests__/variables-test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function executeQuery(
160160
query: string,
161161
variableValues?: { [variable: string]: unknown },
162162
) {
163-
const document = parse(query);
163+
const document = parse(query, { experimentalFragmentArguments: true });
164164
return executeSync({ schema, document, variableValues });
165165
}
166166

src/utilities/__tests__/TypeInfo-test.ts

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -519,17 +519,20 @@ describe('visitWithTypeInfo', () => {
519519
it('supports traversals of fragment arguments', () => {
520520
const typeInfo = new TypeInfo(testSchema);
521521

522-
const ast = parse(`
523-
query {
524-
...Foo(x: 4)
525-
}
522+
const ast = parse(
523+
`
524+
query {
525+
...Foo(x: 4)
526+
}
526527
527-
fragment Foo(
528-
$x: ID!
529-
) on QueryRoot {
530-
human(id: $x) { name }
531-
}
532-
`);
528+
fragment Foo(
529+
$x: ID!
530+
) on QueryRoot {
531+
human(id: $x) { name }
532+
}
533+
`,
534+
{ experimentalFragmentArguments: true },
535+
);
533536

534537
const visited: Array<any> = [];
535538
visit(

0 commit comments

Comments
 (0)