apollographql / apollographql/fullstack-tutorial

querying `launches` returns errors on "final" repo.

Offen
#79 6 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
1.2k
Forks
808
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

It seems the tutorial is out of date, as even the final returns errors, so I know it isn't with my implementation after going through the tutorial.

The playground returns the following after running the `GetLaunches` query from the tutorial:

```
{
"error": {
"errors": [
{
"message": "Cannot query field \"id\" on type \"LaunchConnection\".",
"locations": [
{
"line": 3,
"column": 5
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Cannot query field \"id\" on type \"LaunchConnection\".",
" at Object.Field (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/validation/rules/FieldsOnCorrectType.js:64:31)",
" at Object.enter (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/language/visitor.js:333:29)",
" at Object.enter (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/language/visitor.js:384:25)",
" at visit (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/language/visitor.js:251:26)",
" at Object.validate (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/validation/validate.js:63:22)",
" at validate (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/apollo-server-core/dist/requestPipeline.js:172:32)",
" at Object. (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/apollo-server-core/dist/requestPipeline.js:113:38)",
" at Generator.next ()",
" at fulfilled (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/apollo-server-core/dist/requestPipeline.js:4:58)",
" at process._tickCallback (internal/process/next_tick.js:68:7)"
]
}
}
},
{
"message": "Cannot query field \"mission\" on type \"LaunchConnection\".",
"locations": [
{
"line": 4,
"column": 5
}
],
"extensions": {
"code": "GRAPHQL_VALIDATION_FAILED",
"exception": {
"stacktrace": [
"GraphQLError: Cannot query field \"mission\" on type \"LaunchConnection\".",
" at Object.Field (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/validation/rules/FieldsOnCorrectType.js:64:31)",
" at Object.enter (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/language/visitor.js:333:29)",
" at Object.enter (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/language/visitor.js:384:25)",
" at visit (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/language/visitor.js:251:26)",
" at Object.validate (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/graphql/validation/validate.js:63:22)",
" at validate (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/apollo-server-core/dist/requestPipeline.js:172:32)",
" at Object. (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/apollo-server-core/dist/requestPipeline.js:113:38)",
" at Generator.next ()",
" at fulfilled (/home/petty/Github/apollo-graphql/fullstack-tutorial/final/server/node_modules/apollo-server-core/dist/requestPipeline.js:4:58)",
" at process._tickCallback (internal/process/next_tick.js:68:7)"
]
}
}
}
]
}
}
```

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Rechercherichtung

Beginnen Sie in der final/server-Tutorialimplementierung und prüfen Sie das für die GetLaunches-Abfrage im Playground verwendete Schema. Vergleichen Sie die von der Abfrage angeforderten Felder mit dem LaunchConnection-Typ und dem Tutorialtext. Erledigt ist die Aufgabe, wenn die dokumentierte Abfrage dem finalen Schema entspricht und ohne GraphQL-Validierungsfehler ausgeführt wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
graphql, typescript
Bereich
api, documentation
Issue-Typ
Dokumentation
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.