apollographql / apollographql/fullstack-tutorial
Error when fetching past end of Launches
- Lingua principale
- TypeScript
- Stelle
- 1.2k
- Fork
- 808
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Cursor is defined as non-nullable:
```
type LaunchConnection { # add this below the Query type as an additional type.
cursor: String!
hasMore: Boolean!
launches: [Launch]!
}
```
But if no launches are retrieved (for example if you pass in a cursor for which `hasMore` was false), then the code will carefully return `null` for the cursor:
```
return {
launches,
cursor: launches.length ? launches[launches.length - 1].cursor : null,
```
Resulting in INTERNAL_SERVER_ERROR:
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia con lo schema LaunchConnection sotto il tipo Query e con l’oggetto restituito dal resolver mostrato nell’issue. Riproduci una richiesta usando un cursore oltre la fine dei launches, quindi rendi coerenti il comportamento dello schema e quello del cursore restituito. Il lavoro è terminato quando la richiesta restituisce una risposta GraphQL valida invece di INTERNAL_SERVER_ERROR.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- graphql, typescript
- Ambito
- api, backend
- Tipo di issue
- Bug
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 52/100