-
Couldn't load subscription status.
- Fork 1.4k
Closed
Labels
coreRelated to codegen core/cliRelated to codegen core/clikind/bugBug :-(Bug :-(stage/1-reproductionA reproduction existsA reproduction exists
Description
Issue workflow progress
Progress of the issue based on the Contributor Workflow
- 1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
Make sure to fork this template and run
yarn generatein the terminal.Please make sure the Codegen and plugins version under
package.jsonmatches yours.
- 2. A failing test has been provided
- 3. A local solution has been provided
- 4. A pull request is pending review
Describe the bug
To Reproduce
Steps to reproduce the behavior:
Here's a sandbox showing the broken output:
https://codesandbox.io/s/kind-proskuriakova-h2i4te?file=/types.ts
- My GraphQL schema:
directive @oneOf on INPUT_OBJECT
input IntFilterInput @oneOf {
eq: Int
ne: Int
gt: Int
gte: Int
lt: Int
lte: Int
in: [Int]
}- My
codegen.ymlconfig file:
schema: schema.graphql
generates:
types.ts:
config:
declarationKind: interface
plugins:
- typescriptExpected behavior
To don't generate invalid TypeScript code.
More specifically either override the interface setting and use type or fall back to no special @oneOf handling.
Environment:
@graphql-codegen/typescript: 2.4.2
Metadata
Metadata
Assignees
Labels
coreRelated to codegen core/cliRelated to codegen core/clikind/bugBug :-(Bug :-(stage/1-reproductionA reproduction existsA reproduction exists