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
No response
Related to: #140 (comment)
When running the codegen, fragments are imported (like before), but not used anymore. This generated a TS error.
https://codesandbox.io/s/gql-code-generator-without-dedup-fragments-forked-35lp34?file=/src/user.fragment.generated.tsx
src/user.fragment.generated.tsx
I would expect the fragments to not be imported anymore.
graphql
"@graphql-codegen/add": "3.2.3", "@graphql-codegen/cli": "2.16.4", "@graphql-codegen/introspection": "2.2.3", "@graphql-codegen/near-operation-file-preset": "2.5.0", "@graphql-codegen/typed-document-node": "2.3.12", "@graphql-codegen/typescript": "2.8.7", "@graphql-codegen/typescript-operations": "2.5.12",
schema: schema.graphql documents: 'src/**/*.graphql' generates: src/: preset: near-operation-file presetConfig: baseTypesPath: types.ts extension: .generated.tsx plugins: - typescript - typescript-operations - typed-document-node config: onlyOperationTypes: true preResolveTypes: true inlineFragmentTypes: 'combine'
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Which packages are impacted by your issue?
No response
Describe the bug
Related to: #140 (comment)
When running the codegen, fragments are imported (like before), but not used anymore. This generated a TS error.
Your Example Website or App
https://codesandbox.io/s/gql-code-generator-without-dedup-fragments-forked-35lp34?file=/src/user.fragment.generated.tsx
Steps to Reproduce the Bug or Issue
src/user.fragment.generated.tsx
Expected behavior
I would expect the fragments to not be imported anymore.
Screenshots or Videos
No response
Platform
graphql
16.6.0"@graphql-codegen/add": "3.2.3",
"@graphql-codegen/cli": "2.16.4",
"@graphql-codegen/introspection": "2.2.3",
"@graphql-codegen/near-operation-file-preset": "2.5.0",
"@graphql-codegen/typed-document-node": "2.3.12",
"@graphql-codegen/typescript": "2.8.7",
"@graphql-codegen/typescript-operations": "2.5.12",
Codegen Config File
schema: schema.graphql
documents: 'src/**/*.graphql'
generates:
src/:
preset: near-operation-file
presetConfig:
baseTypesPath: types.ts
extension: .generated.tsx
plugins:
- typescript
- typescript-operations
- typed-document-node
config:
onlyOperationTypes: true
preResolveTypes: true
inlineFragmentTypes: 'combine'
Additional context
No response
The text was updated successfully, but these errors were encountered: