graphql-playground
graphql-playground copied to clipboard
createApolloLink expects an ApolloClient, not ApolloLink
This issue pertains to the following package(s):
- [x] 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?