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

Introduce subscription hooks #267

Merged
merged 12 commits into from
Jan 20, 2019
Merged

Conversation

ardatan
Copy link
Collaborator

@ardatan ardatan commented Jan 15, 2019

No description provided.

Signed-off-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
Signed-off-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
@dotansimha
Copy link
Collaborator

dotansimha commented Jan 16, 2019

@ardatan can you please do the same for the rest of the events? onConnect, onOperationComplete, onOperation and onDisconnect

@ardatan
Copy link
Collaborator Author

ardatan commented Jan 16, 2019

Signed-off-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
Signed-off-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
Signed-off-by: Arda TANRIKULU <ardatanrikulu@gmail.com>
@dotansimha
Copy link
Collaborator

Hmm yeah but there are more, and I think it's important to support them :)

@ardatan ardatan force-pushed the enhancement/subscription-hooks branch 10 times, most recently from 6010b96 to eabc1cf Compare January 19, 2019 01:31
@ardatan ardatan force-pushed the enhancement/subscription-hooks branch from eabc1cf to 0122f92 Compare January 19, 2019 03:35
@ardatan
Copy link
Collaborator Author

ardatan commented Jan 19, 2019

We don't use options to use these hooks; we call the hooks defined in providers instead.
And apollo configuration doesn't have onOperation and onOperationComplete hooks in its configuration; it will be useless to put them in our code.
But if people wants to use GraphQLModules inside these hooks, they can call injector from the module and use DI with it.
Except these; the PR is ready to merge. It works great with both session scope and building context inside the hook approaches.

@dotansimha dotansimha merged commit add497c into master Jan 20, 2019
@dotansimha dotansimha deleted the enhancement/subscription-hooks branch January 20, 2019 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants