-
Notifications
You must be signed in to change notification settings - Fork 787
Conversation
@flexzuu: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Meteor Contributor Agreement here: https://contribute.meteor.com/ |
Tests seem to not only dont work correctly on my setup but CI aswell:
|
@jbaxleyiii hey thanks for merging i found some more stuff i needed to edit to finish this feature. will push this now. Will look into the failing tests and add some more tests if needed. |
5f6da37
to
a79e5ac
Compare
Will work on adding test for the new option next. After that docs and changelog will be added. |
Adds support for client in graphql HoC to support usecases with more than one ApolloClient
Because it checks if variables are present
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so great! Let's plan on updating the docs when this is released! YAY @flexzuu
@jbaxleyiii Hey thanks for mergeing. I will start working on the docs in my free time. |
This rocks! Until the documentation gets updated would one of you mind sharing what the syntax looks like for adding more than one client? |
Check back with me again if you have anymore questions. I am relatively busy right know will work on the docs next week. |
Neat. So you can initialize a bunch of clients and then decide which one you want to use on a component by component basis? |
Hey @flexzuu thanks for this contribution, I'm trying to implement this but I can't involucrate the two ApolloClient instances, do you have the documentation somewhere? |
@flexzuu Could we get some docs for this please? |
@vjpr i completely reworked the idea and will publish some stuff about how to use it in the future. The basic idea is that you don't use the option apollo provides but just use 2 providers and the standard graphql hoc then you would add in 2 tunnels that reexpose the context under a namespaced key. You can then use something like recomposes fromContext and withContext to connect to the namespaced context and reexpose it under the original context this way you can use the vanilla provider and vanilla hoc but you can use as many providers as you like. I will try to build a Tunnel lib out of this but if first need to see how well this approach hold up against real world use cases. |
Adds support for client in graphql HoC to support usecases with more than one ApolloClient
Proposal and discussion: #464
Other relevant PR: #481
Docs: WIP
TODO: