99designs / 99designs/gqlgen

Sharing input and output type schemas

Aperta
#3,057 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
10.8k
Fork
1.3k
Merge medio
2g 36m
PR unite (30g)
26

Descrizione

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
}
```

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.