forked from enisdenjo/graphql-ws
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(server): More callbacks, clearer differences and higher extensib…
…ility (enisdenjo#40) BREAKING CHANGES This time we come with a few breaking changes that will open doors for all sorts of enhancements. Check the linked PR for more details. ### Server option `onSubscribe` - Now executes _before_ any other subscribe message processing - Now takes 2 arguments, the `Context` and the `SubscribeMessage` - Now returns nothing,`ExecutionArgs` or an array of `GraphQLError`s - Returning `void` (or nothing) will leave the execution args preparation and validation to the library - Returned `ExecutionArgs` will be used **directly** for the GraphQL operation execution (preparations and validation should be done by you in this case) - Returned array of `GraphQLError`s will be reported to the client through the `ErrorMessage` ### Server option `validationRules` Dropped in favour of applying custom validation rules in the `onSubscribe` callback. Find the recipe in the readme! ### Server option `formatExecutionResult` Dropped in favour of using the return value of `onNext` callback.
- Loading branch information
Showing
10 changed files
with
1,011 additions
and
344 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.