-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Define "execution result" and "request error result" #1159
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for graphql-spec-draft ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Rob Richard <rob@1stdibs.com>
f2b4d37
to
1dbb9c6
Compare
If execution raised any errors, the _execution result_ must contain an entry | ||
with key {"errors"}. The value of this entry must be a non-empty list of | ||
_execution error_ raised during execution. Each error must be a map as described | ||
in the "Errors" section below. If the request completed without raising any | ||
errors, this entry must not be present. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved and adjusted some of the text from the Errors section. Placing it under Execution Result
and Request Error Result
so we can describe the specific behavior (must be included in Request Error Result
, may be included in Execution Result
) without the Errors section having conditions for each type.
If the {"data"} entry in the response is present (including if it is the value | ||
{null}), the {"errors"} entry must be present if and only if one or more | ||
_execution error_ was raised during execution. | ||
The {"errors"} entry in the _execution result_ or _request error result_ is a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also define a type Response Result that includes both Execution Result and Request Error Result as subtypes, but adding another layer of hierarchy might be less clear?
Follow up from #1135
This creates a definition for Execution Result and Request Error Result. The definition of Response is updated to include Execution Result, Request Error Result and Response Stream (for subscriptions).
Incremental Delivery will introduce additional types built on top of this change. I am currently thinking something like this: