Skip to content

feat: allow runtime errors and validation errors in onSubscribe #36

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 1 commit into from
Aug 21, 2021

Conversation

reconbot
Copy link
Owner

@reconbot reconbot commented Aug 21, 2021

Change the API of onSubscribe to allow returning validation errors (to reject a subscription) and throwing errors to close the connection (usually only happens if there's a big problem).

This came from talking it over at graphql-ws enisdenjo/graphql-ws#226

bonus

  • add a timeout for test helpers

Change the API of `onSubscribe` to allow returning validation errors (to reject a subscription) and throwing errors to close the connection (usually only happens if there's a big problem).

bonus 
- add a timeout for test helpers
@reconbot reconbot merged commit 02507d6 into master Aug 21, 2021
@reconbot reconbot deleted the reconbot/more-better-error-handling branch August 21, 2021 20:50
@github-actions
Copy link

🎉 This PR is included in version 2.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant