graphql / graphql-playground

🎮 GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration)
MIT License
8.75k stars 730 forks source link

createApolloLink expects an ApolloClient, not ApolloLink #1362

Open wmertens opened 2 years ago

wmertens commented 2 years ago

This issue pertains to the following package(s):

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?