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

Abierto
#446 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
Medio día
Aptitud para principiantes
25/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
graphql
Área
api

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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 😄

Lenguaje dominante
JavaScript
Estrellas
428
Forks
70
Merge medio
11 min
PR fusionados (30 d)
4

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de graphql/graphql-over-http

Todos los issues de graphql/graphql-over-http

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.