You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
Intended outcome:
Importing the raw Context object like this should be possible:
Why do I need the raw Context?
The
useContext
hook requires a Context object (returned fromcreateContext
) as its parameter.This is the the intended use:
Actual outcome:
Only the wrapped
ApolloProvider
andApolloConsumer
can be imported individually, which cannot be supplied to theuseContext
hook.This is how I'm importing them now:
This is how I'm passing it to
useContext
:This results in
apolloClient
beingundefined
when trying to invokewatchQuery
like this:and throws a TypeError:
How to reproduce the issue:
react-apollo@^3.0.0-alpha.0
ApolloProvider
andApolloConsumer
as described aboveuseContext
as described aboveapolloClient
Version
The text was updated successfully, but these errors were encountered: