We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@graphql-codegen/client-preset
Preset generates imports like import * as types from './graphql'; which are not compatible with TypeScript in ESM mode with moduleResolution node16.
import * as types from './graphql';
moduleResolution
node16
any schema will do
Simply run codegen build.
When emitLegacyCommonJSImports is disabled, imports should be ESM-compatible.
emitLegacyCommonJSImports
No response
export default { schema: "./src/schema.json", documents: ["./src/queries/*.graphql"], generates: { "./src/gql/": { preset: "client", presetConfig: { useTypeImports: true, }, config: { emitLegacyCommonJSImports: false, }, }, }, };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which packages are impacted by your issue?
@graphql-codegen/client-preset
Describe the bug
Preset generates imports like
import * as types from './graphql';
which are not compatible with TypeScript in ESM mode withmoduleResolution
node16
.Your Example Website or App
any schema will do
Steps to Reproduce the Bug or Issue
Simply run codegen build.
Expected behavior
When
emitLegacyCommonJSImports
is disabled, imports should be ESM-compatible.Screenshots or Videos
No response
Platform
Codegen Config File
Additional context
No response
The text was updated successfully, but these errors were encountered: