Skip to content

Commit 8d962e8

Browse files
committed
Add benchmark
1 parent e29840c commit 8d962e8

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { graphqlSync } from 'graphql/graphql.js';
2+
import { buildSchema } from 'graphql/utilities/buildASTSchema.js';
3+
4+
import { bigSchemaSDL } from './fixtures.js';
5+
6+
const schema = buildSchema(bigSchemaSDL, { assumeValid: true });
7+
const query = `{ ${'__typename '.repeat(2000)}}`;
8+
9+
export const benchmark = {
10+
name: 'Many repeated fields',
11+
count: 50,
12+
measure() {
13+
graphqlSync({
14+
schema,
15+
source: query,
16+
});
17+
},
18+
};

0 commit comments

Comments
 (0)