graphql / graphql/graphql.github.io
Clarification on "Schemas and Types" documentation
- Vorherrschende Sprache
- TypeScript
- Sterne
- 889
- Forks
- 1.5k
- Ø Merge
- 4 T. 12 Std.
- Gemergte PRs (30 T.)
- 21
Beschreibung
Hoping my input from a GraphQL newbie reading your documentation is helpful. This section https://graphql.org/learn/schema/#the-query-and-mutation-types needs a more verbose explanation. It's not clear why I would define the Query and Mutation types in my own schema if they are already reserved entities in GraphQL. Are you suggesting that 'query' and 'mutation' are example entities or example types "Query" and "Mutation"? If so, I'd recommend prepending "my" to them to make this obvious. If not examples, why are they being defined? Can a schema have only one Query and one Mutation? It's confusing to someone new to GraphQL and I think some more verbose explanation and better example would be useful.
Also in this page, it seems like a bad idea to define an enumeration like Episode, of which the content is dynamic data. A better enumeration example would be something where the data items are expected to never change. E.g. Units = Kilometers | Miles
Beitragsleitfaden
Rechercherichtung
Beginnen Sie mit dem verlinkten Abschnitt „Schemas and Types“ unter graphql.org/learn/schema/#the-query-and-mutation-types und sehen Sie sich die Beispiele für Query, Mutation und Episode an. Klären Sie, ob Query und Mutation Beispiel-Schematypen oder reservierte Entitäten sind, erläutern Sie ihre Einschränkungen und ersetzen oder überarbeiten Sie das Beispiel für ein dynamisches Enum, damit die Dokumentation für GraphQL-Einsteiger verständlich ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- graphql
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100