I have tried following the instructions on Apollo Client for sending cookies along with the graphql request, but the express server is not receiving any cookies and when I i
I do not understand this why the documentation says what it does, although perhaps a developer with more experience would not have had a problem.
Anyway, the less experienced developer should note that instead of:
const link = createHttpLink({
uri: 'http://localhost:3000/api/graphql',
opts: {
credentials: 'include',
}
});
It should just be:
const httpLink = createHttpLink({
uri: 'http://localhost:3000/api/graphql',
credentials: 'same-origin'
});
In other words, there is no separate opts object within the createHttpLink configuration object.