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

Fix #38 #40 resolver in subscription #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

josephktcheung
Copy link
Contributor

@josephktcheung josephktcheung commented Sep 10, 2018

This is to fix #38. Since there are no CurrentRequest, CurrentResponse and dataLoaders in the context / container when it's subscription, the resolver will fail when it tries to access those from context in buildCustomResolvers.

Since CurrentRequest and CurrentResponse can be undefined in subscriptions, I use the try catch to check if those 2 keys exists in the Container.

I also set dataLoaders to an empty array in context when a new subscriber connects to server.

@josephktcheung josephktcheung changed the title Fix #38 resolver in subscription Fix #38 #40 resolver in subscription Sep 11, 2018
@josephktcheung
Copy link
Contributor Author

Also fix #40 by adding connectionParams to context so that user can use setUpContainer callback to implement authentication (similar to sample 10)

@otonielguajardo
Copy link

Any update on this? This is an awesome framework! would be a shame to stop updating it

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.

Resolver doesn't work with subscription
2 participants