adamsoffer / next-apollo

React higher-order component for integrating Apollo Client with Next.js
MIT License
482 stars 64 forks source link

Can we have an access to context ctx in apolloClient ? #82

Closed zarghamkhandev closed 3 years ago

zarghamkhandev commented 3 years ago

Hi, i need to send cookie from nextjs to backend, would be nice if we have access to ctx in apolloClient function when ssr is true.

adamsoffer commented 3 years ago

Hey @zarghamkhandev - the project was recently converted to typescript and I believe you now have access to ctx https://github.com/adamsoffer/next-apollo/blob/master/src/withApollo.tsx#L218

Let me know if this is still an issue.

lukel97 commented 3 years ago

@adamsoffer are we supposed to copy over this module ourselves and edit createApolloClient to do what we need with the context object?

adamsoffer commented 3 years ago

Closed by #83