Issue workflow progress
Progress of the issue based on the Contributor Workflow
Make sure to fork this template and run yarn generate in the terminal.
Please make sure the Codegen and plugins version under package.json matches yours.
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.yml config file:
schema: schema.graphql
generates:
types.ts:
config:
declarationKind: interface
plugins:
- typescript
Expected 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
Issue workflow progress
Progress of the issue based on the Contributor Workflow
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
codegen.ymlconfig file:Expected behavior
To don't generate invalid TypeScript code.
More specifically either override the
interfacesetting and usetypeor fall back to no special@oneOfhandling.Environment:
@graphql-codegen/typescript: 2.4.2