Skip to content

Update serving over HTTP docs. #1813

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Nov 15, 2024
Merged

Conversation

mandiwise
Copy link
Contributor

Description

This PR contains updated "Serving over HTTP" content for the Learn docs. Key changes include:

  • Expanded content that aligns with the draft GraphQL over HTTP spec
  • Light editing throughout

@benjie @jorydotcom

Copy link

vercel bot commented Nov 3, 2024

@mandiwise is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent expansion! Many of these suggested edits are incredibly minor nits 🙌

mandiwise and others added 2 commits November 7, 2024 10:26
Co-authored-by: Benjie <benjie@jemjie.com>
Co-authored-by: Benjie <benjie@jemjie.com>
Copy link

vercel bot commented Nov 7, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
graphql-github-io ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 7, 2024 6:21pm

Copy link
Member

@benjie benjie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - excellent work!

Comment on lines -62 to +108
If there were no errors returned, the `"errors"` field should not be present on the response. If no data is returned, [according to the GraphQL spec](https://spec.graphql.org/October2021/#sec-Data), the `"data"` field should only be included if no errors occurred during execution.
If no errors were returned, the `errors` field must not be present in the response. If errors occurred before execution could start, the `errors` field must include these errors and the `data` field must not be present in the response. The `extensions` field is optional and information provided here will be at the discretion of the GraphQL implementation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@graphql/tsc please confirm I'm not missing something about the second sentence in the original text... I couldn't quite make sense of it?

If no data is returned, according to the GraphQL spec, the "data" field should only be included if no errors occurred during execution.

We've instead replaced it with the following, but I want to be sure we've not missed something:

If errors occurred before execution could start, the errors field must include these errors and the data field must not be present in the response.

@benjie benjie merged commit a11ee00 into graphql:source Nov 15, 2024
4 checks passed
mandiwise added a commit to mandiwise/graphql.github.io that referenced this pull request Nov 19, 2024
Co-authored-by: Benjie <benjie@jemjie.com>
mandiwise added a commit to mandiwise/graphql.github.io that referenced this pull request Nov 22, 2024
Co-authored-by: Benjie <benjie@jemjie.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants