diff --git a/dev-test/gql-tag-operations-urql/gql/index.d.ts b/dev-test/gql-tag-operations-urql/gql/index.d.ts index fed8bf093b2..2bb13e0433b 100644 --- a/dev-test/gql-tag-operations-urql/gql/index.d.ts +++ b/dev-test/gql-tag-operations-urql/gql/index.d.ts @@ -1,7 +1,7 @@ /* eslint-disable */ -declare module '@urql/core' { - import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core'; +declare module '@urql/core' { export function gql( source: '\n query Foo {\n Tweets {\n id\n }\n }\n' ): typeof import('./graphql').FooDocument; diff --git a/packages/plugins/typescript/gql-tag-operations/src/index.ts b/packages/plugins/typescript/gql-tag-operations/src/index.ts index f1ecd74aea7..8de53238637 100644 --- a/packages/plugins/typescript/gql-tag-operations/src/index.ts +++ b/packages/plugins/typescript/gql-tag-operations/src/index.ts @@ -48,9 +48,9 @@ export const plugin: PluginFunction<{ } return [ + `import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`, `declare module "${config.augmentedModuleName}" {`, [ - `import { TypedDocumentNode as DocumentNode } from '@graphql-typed-document-node/core';\n`, `\n`, ...getGqlOverloadChunk(config.sourcesWithOperations, 'augmented'), `export function gql(source: string): unknown;\n`,