The steps:
POST GraphQL request.jwt=I%20AM%20peterlitszo%40gmail.com.I am sure that the cookie is setted by response:
const result = res(
// It will set header with `Set-Cookie: jwt=I%20AM%20peterlitszo%40gmail.com`
ctx.cookie('jwt', `I AM ${email}`),
ctx.data({
users: [],
}),
);
But I cannot find Set-Cookie in Chrome debugger's Network tag.
I am no sure what happen, do Set-Cookie cannot be show in Devtool? I cannot find information about it with Google.
Not only Chrome, I cannot find it in Firefox. :(
Sorry, my bad.
Here is answer, https://mswjs.io/docs/recipes/cookies#mock-response-cookies :
Note that you still won't be able to access the Set-Cookie header on the response, as the cookie is set on the document directly, bypassing network.
I am using MSW to mock data, also mock the Set-Cookie.