Replies: 1 comment 4 replies
-
I guess we could consider that as we do support it in vue/svelte, in (P)React we are currently relying on context exclusively. I don't think there are roadblocks remaining for doing this, i.e. previously we had an exchange to facilitate Suspense which could have blocked this. Previously however we have declined this, #429, because context boundaries often imply data hierarchy and it could indicate that the hierarchy might be a bit odd. Would love to know the use case here |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'd like to propose adding the following API:
We have multiple graphql endpoints with different caches in our app, each using URQL. They have overlapping names in some cases and thus cannot share the same cache. There have been some discussions about multiple endpoints in the past. However, they do not solve the problem.
Simply passing a different
context.url
doesn't solve the problem of a different cache.Meanwhile, I could wrap certain components with a different provider. But this doesn't scale well and isn't a very composable API. Some components want to access both caches.
I'd implement this by making my own context provider at the root of the app, and inside a custom
useQuery
wrapper, I would pass down this client.The new
cilent-preset
methodology from GraphQL Codegen makes this approach much more doable.Beta Was this translation helpful? Give feedback.
All reactions