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

createApolloLink expects an ApolloClient, not ApolloLink #1362

Open
1 task done
wmertens opened this issue Jan 19, 2022 · 0 comments
Open
1 task done

createApolloLink expects an ApolloClient, not ApolloLink #1362

wmertens opened this issue Jan 19, 2022 · 0 comments

Comments

@wmertens
Copy link

This issue pertains to the following package(s):

  • GraphQL Playground

latest npm version

according to the docs, createApolloLink should return a Link, but it only works if I return ApolloClient.

I'm trying to use my existing link in my app, so I imported MiddleWareApp directly and then grab the client with useApolloClient.

const client = useApolloClient()
return <MiddleWareApp createApolloLink={()=>client} />

Also, for subscription queries, it doesn't seem to use the provided link?

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

No branches or pull requests

1 participant