Skip to content

Fix "response position" definition; clarify sibling errors on propagation - #1183

Merged
leebyron merged 4 commits into
mainfrom
clarify-one-error-per-result-position
Sep 17, 2026
Merged

leebyron merged 4 commits into
mainfrom
clarify-one-error-per-result-position

Conversation

@benjie

@benjie benjie commented Jul 10, 2025

Copy link
Copy Markdown
Member

If a response position resolves to {null} because of an execution error which
has already been added to the {"errors"} list in the execution result, the
{"errors"} list must not be further affected. That is, only one error should be
added to the errors list per response position.

The response position mentioned at the beginning of this paragraph is different to the response position from which the error originated; therefore "only one error should be added to the errors list per response position" is kind of moot. Actually what we mean here is that the response path of the error (i.e. the "path" entry in the error object) should be unique.

This edit clarifies that it's the "path" of the error that matters (and should be unique), not the position that re-raised it.

@benjie benjie added the ✏️ Editorial PR is non-normative or does not influence implementation label Jul 10, 2025
@netlify

netlify Bot commented Jul 10, 2025

Copy link
Copy Markdown

Deploy Preview for graphql-spec-draft ready!

Name Link
🔨 Latest commit 8716c0a
🔍 Latest deploy log https://app.netlify.com/projects/graphql-spec-draft/deploys/6aac27d9a37d12000888a0a9
😎 Deploy Preview https://deploy-preview-1183--graphql-spec-draft.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@benjie
benjie force-pushed the clarify-one-error-per-result-position branch from 599b654 to a3092d9 Compare July 10, 2025 13:11
@ddebrunner

This comment was marked as outdated.

@benjie

This comment was marked as outdated.

@benjie
benjie force-pushed the clarify-one-error-per-result-position branch from a3092d9 to fc70008 Compare July 10, 2025 16:00
@benjie benjie changed the title Clarify error reporting for siblings of error propagation Fix "response position" definition; clarify sibling errors on propagation Jul 10, 2025
@benjie
benjie force-pushed the clarify-one-error-per-result-position branch 2 times, most recently from e199ebb to 4d6f01b Compare July 10, 2025 17:26
@leebyron leebyron added the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Jul 17, 2025
@benjie

benjie commented Jul 17, 2025

Copy link
Copy Markdown
Member Author

Plan from today's WG:

  1. open a new PR that clarifies "response position" without renaming to "execution position" (which could be ambiguous w.r.t. visiting fragments?)
  2. rebase this change on that PR, so this becomes just the one sentence change
  3. see how hard this would be to implement in GraphQL.js and a few other implementations
  4. if hard, reject
  5. in graphql-toe, throw the last error that matches the path (just reverse the array?) or throw an aggregate error

@yaacovCR

Copy link
Copy Markdown
Contributor

graphql/graphql-js#4458 not sure if this is the implementation you want to test, I thought it’s the implementation for: #1184

@benjie
benjie force-pushed the clarify-one-error-per-result-position branch from 4d6f01b to fbd43e8 Compare September 10, 2026 13:50
@benjie
benjie changed the base branch from main to clarify-definition-of-response-position September 10, 2026 13:52
@benjie

benjie commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

Editorial change for definition of response position extracted to here:

@benjie
benjie added this pull request to stack #1239 September 10, 2026 14:02

@martinbonnin martinbonnin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If a _response position_ resolves to {null} because of an execution error which
has already been added to the {"errors"} list in the _execution result_, the
{"errors"} list must not be further affected. That is, only one error should be
added to the errors list per _response position_.

FWIW, I don't necessarily read this as "the response position at the beginning of the paragraph and at the end must be the same". So the curernt text was ok-ish to me.

Nevertheless, the new text is more explicit so all good 👍

Base automatically changed from clarify-definition-of-response-position to main September 17, 2026 17:48
@leebyron
leebyron force-pushed the clarify-one-error-per-result-position branch from fbd43e8 to 8716c0a Compare September 17, 2026 17:48

@leebyron leebyron left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice. I like that this cleans up things since the response since the response position might not exist in the response thanks to bubbling.

@leebyron leebyron removed the 💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md) label Sep 17, 2026
@leebyron leebyron added the 🏁 Accepted (RFC 3) RFC Stage 3 (See CONTRIBUTING.md) label Sep 17, 2026
@leebyron
leebyron merged commit 6ab9475 into main Sep 17, 2026
9 checks passed
@leebyron
leebyron deleted the clarify-one-error-per-result-position branch September 17, 2026 17:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏁 Accepted (RFC 3) RFC Stage 3 (See CONTRIBUTING.md) ✏️ Editorial PR is non-normative or does not influence implementation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants