I am currently building chat application with microservice architecture, where auth(login and signup) service and chat service are separated using Graphql. I was trying to attach a JWT to the request header of query, mutation and subscription to extract user id from it to use for inner logic in the services. However, I cannot properly set the token to the header or subscription parameter in Altair Graphql, although token is successfully set for the query and mutation in exact same manner. My questions are;
- Is there any way to attach JWT token to the request header?
- Is there any better way to send JWT token to the graphql subscription request?
Moreover, the ways I tried to set the token for subscription request are the following;
Thank you.