-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
Milestone
Description
Environment: Browser
Version: >=3.8.0-alpha.14
Using @apollo/client
versioning 3.8.0-alpha.14
+, I'm receiving this invariant error from the ApolloProvider
context component claiming that the client is not available for use within my query hooks. I know this to not be true because the application does not even mount unless the client is set (see snippet below).
This error persists through to the current 3.8.0-beta.0
version as well.
Snippets
export function App() {
const user = useAuthenticatedUser();
if (!user) {
return <Loading />;
}
const apolloClient = createApolloClient(user.jwt);
return (
<ApolloProvider client={apolloClient} suspenseCache={suspenseCache}>
<div
style={{
display: "flex",
flexDirection: "column",
height: "100%",
}}
>
<Router />
</div>
</ApolloProvider>
);
}