Skip to content
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

When sourceStream errors, raise an error payload instead #1127

Open
wants to merge 3 commits into
base: streams-editorial
Choose a base branch
from

Conversation

benjie
Copy link
Member

@benjie benjie commented Nov 21, 2024

See https://github.com/graphql/graphql-spec/pull/1099/files#r1799509253

Currently if sourceStream generates an error, then responseStream repeats the error. This is the behavior implemented in graphql-js and is problematic.

GraphQL captures execution errors and wraps them in an { errors: [...] } payload for query and mutation operations; it should do the same for stream errors in a subscription operation.

This PR makes this change. It is technically a breaking change, I think, so will require careful thought.

@benjie
Copy link
Member Author

benjie commented Nov 21, 2024

Closing in favour of an inline edit

@benjie benjie closed this Nov 21, 2024
@benjie benjie reopened this Nov 21, 2024
@benjie
Copy link
Member Author

benjie commented Nov 21, 2024

Re-opened since #1099 is editorial whereas this is a behavioural change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💭 Strawman (RFC 0) RFC Stage 0 (See CONTRIBUTING.md)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant