You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That's unfortunately impossible, since in that moment you are on the server and the server has no knowledge about the cookies of your Browser.
You can forward cookies from the incoming request (that calls SSR) to the outgoing request that calls your api - but you have to do so manually.
Unfortunately, this is a multi-step process as in Next.js SSR, you don't have access to cookies. So you have to get the cookies in RSC, forward them as props to your ApolloWrapper component and then add them to the outgoing request.
When transporting cookies as props, ensure to encrypt them, as otherwise they would be readable in the browser, too.
Patrick has created a great example for that over here: #281 (comment)
Send credentials from here giving error
app/ApolloWrapper.jsx
file like this thisI want to send Like this
const httpLink = createHttpLink({ uri: "http://localhost:8000/graphql", credentials: "include", });
Tasks
The text was updated successfully, but these errors were encountered: