We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebcdfd2 commit e591e95Copy full SHA for e591e95
src/validation/__tests__/validateInvalidGQL-benchmark.js
@@ -0,0 +1,29 @@
1
+// @flow strict
2
+
3
+import { parse } from '../../language/parser';
4
+import { buildSchema } from '../../utilities/buildASTSchema';
5
6
+import { validate } from '../validate';
7
8
+import { bigSchemaSDL } from '../../__fixtures__';
9
10
+const schema = buildSchema(bigSchemaSDL, { assumeValid: true });
11
+const queryAST = parse(`
12
+ {
13
+ unknownField
14
+ ... on unknownType {
15
+ anotherUnknownField
16
+ ...unknownFragment
17
+ }
18
19
20
+ fragment TestFragment on anotherUnknownType {
21
+ yetAnotherUnknownField
22
23
+`);
24
25
+export const name = 'Validate Invalid Query';
26
+export const count = 50;
27
+export function measure() {
28
+ validate(schema, queryAST);
29
+}
0 commit comments