refactor(graphql): codegen (#10626)

This commit is contained in:
liuyi
2025-03-06 12:06:19 +08:00
committed by GitHub
parent fb084a9569
commit 7e61a0b2fc
10 changed files with 487 additions and 715 deletions
@@ -7,8 +7,7 @@ import type { GraphQLQuery } from '../graphql';
const query: GraphQLQuery = {
id: 'query',
query: 'query { field }',
operationName: 'query',
definitionName: 'query',
op: 'query',
};
let fetch: Mock;
@@ -55,7 +54,6 @@ describe('GraphQL fetcher', () => {
body: '{"query":"query { field }","variables":{"a":1,"b":"2","c":{"d":false}},"operationName":"query"}',
headers: expect.objectContaining({
'content-type': 'application/json',
'x-definition-name': 'query',
'x-operation-name': 'query',
}),
method: 'POST',