dotansimha / dotansimha/graphql-code-generator
arrayInputCoercion not working
- Dominant language
- TypeScript
- Stars
- 11.3k
- Forks
- 1.4k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 23
Description
### Discussed in https://github.com/dotansimha/graphql-code-generator/discussions/8191
Originally posted by **markedwards** August 5, 2022
I have the following codegen.yml:
```
overwrite: true
schema: "lib/api/schema.graphql"
documents: "lib/api/(fragments|mutations|queries)/**/*.ts?(x)"
generates:
lib/api/types.ts:
config:
avoidOptionals:
field: true
namingConvention:
enumValues: keep
nonOptionalTypename: true
plugins:
- "typescript"
- "typescript-operations"
```
I'm not seeing arrayInputCoercion applied. In other words, array properties of input types are generated as only an array, rather than either an array or a single value of the given type.
Does this only work on variables, and not on input types?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.