I am using Apollo Client in my React app.
When a user is logged-in in our cms we set a HttpOnly cookie. I can see in my React app (browser) when I inspect with devtools this cookie has been set: MYNAMEffb4afd023baac83115bf7882
.
I need to send a custom Request header to each GraphQl query request. But only when above cookie has been set.
The custom header:
X-My-Name: Name
What are the steps I have to follow?