I configured my apollo client to send cookies in every request:
apollo: {
clients: {
default: {
httpLinkOptions: {
credentials: 'include',
},
httpEndpoint: `${process.env.NUXT_ENV_GRAPH_URL}`,
},
},
},
My app is holding following cookies:
Now when I perform mutation to graphql I see that none of above cookies is sent instead it creates some new cookie and attach it to request:
And now without reloading the page if I go back to cookies tab in devtools, I see that new cookie is created:
Can I somehow force apollo client to attach access_token
cookie instead of creating new one?
1
Those cookies seem to be scoped to
localhost
, but you are sending requests tolocalhost:3000
here – could it be that you just have completely different cookies in store for that other domain?47 mins ago