Clarification about usage of 404 not found in the `application/graphql-response+json` spec

Aperta
#446 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
25/100
Tipo di issue
Documentazione
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
graphql
Ambito
api

Direzione di ricerca

The payload names no files, so start in the draft specification text and find the section on HTTP status codes for 4xx responses, then read the three existing comments for any decision already reached. Work here means answering whether a missing resource should return 404 or 200 with data: null, and the result is either a maintainer-agreed answer or a proposed wording change to the spec. Expect to need maintainer input before writing anything.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hey hey,

Not sure if this is the right place to ask, but hopefully someone can still help us out :)

We are currently implementing application/graphql-response+json, which means we should use standard HTTP status codes. We are, however, having a discussion about how to handle cases where the requested data, such as a user, does not exist.

According to this specification, should we return a 404 status code, or should we return a 200 response with "data": null?
We could not find this scenario in the section with all the 4xx status code examples, which made us wonder. ​‌

Thanks in advance 😄

Lingua principale
JavaScript
Stelle
428
Fork
70
Merge medio
11m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di graphql/graphql-over-http

Tutte le issue di graphql/graphql-over-http

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.