I have a client which sends an id encoded into a jwt token in a request header. On my server, I’d like to decode this token and add the id to the context so that my resolvers can then use that id.
createApolloServer, you can specify a function which takes in a context and spits out a new context, but I’m not sure how to access request headers from there. Is there a way, or am I barking up the wrong tree? How can I accomplish what I’m trying to do?