You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
QUERY is an idempotent cacheable request with a body that maps quite well to GraphQL queries.
This is based off #404, do not merge before the other PR is merged.
This editorial duplicates a bit of text but since this is a spec and not a novel, I'd rather have duplication than missing information. Maybe the JSON encoding part could be factored in but not sure how.
A QUERY request instructs the GraphQL-over-HTTP server to perform a query operation.
A server MAY accept QUERY requests. If a server accepts QUERY requests, it MUST handle the request and response according to all requirements that apply to POST requests, except as otherwise specified in this section.
QUERY requests MUST NOT be used for executing mutation operations. If the values of {query} and {operationName} indicate that a mutation operation is to be executed, the server MUST respond with error status code 405 (Method Not Allowed) and halt execution. This restriction is necessary to conform with the long-established semantics of safe methods within HTTP.
Then any future changes to the POST requirements are inherited by the QUERY requirements. Or are there more differences?
Then any future changes to the POST requirements are inherited by the QUERY requirements. Or are there more differences?
There is one difference in the paragraph that POST is required while QUERY is optional:
A server MUST support POST requests encoded with the `application/json` media
type (as indicated by the `Content-Type` header) encoded with UTF-8.
But that's something you call out at the beginning of your version.
I think the "condensed" part is easier to read and maintain but is a bit less clear.
Both work for me.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See https://www.rfc-editor.org/rfc/rfc10008.html
QUERYis an idempotent cacheable request with a body that maps quite well to GraphQL queries.This is based off #404, do not merge before the other PR is merged.
This editorial duplicates a bit of text but since this is a spec and not a novel, I'd rather have duplication than missing information. Maybe the JSON encoding part could be factored in but not sure how.