Sharing input and output type schemas
Open
- Dominant language
- Go
- Stars
- 10.8k
- Forks
- 1.3k
- Avg merge
- 2d 36m
- Merged PRs (30d)
- 26
Description
Is there a pattern or templating support to allow input and output types to share a consistent schema in the schema definition? I know that GraphQL doesn't natively support this but in some languages (TypeScript) people have worked around it using templating techniques.
Specifically when I want to ensure a consistent schema across an input and output types such as:
```
type WidgetConfig {
enableWidget1: Boolean!
enableWidget2: Boolean!
}
input WidgetConfigInput {
enableWidget1: Boolean!
enableWidget2: Boolean!
}
mutation {
configureWidget(config: WidgetConfigInput!): WidgetConfig
}
```
Contributor guide
Assessment
This issue has not been assessed yet.