I want to fetch a header value I am passing during a GraphQl Query call. Something like we can do prior in case of rest api HttpServletRequest.getheader()
I wanted to fetch it from the dataFetchingEnvironment but the context fetched from this value did not get me any means to fetch the header values from request.
try {
GraphQLContext context = env.getGraphQlContext();
String Id= context.getHeader("headerkeyIpass");
// I know this method does not exist i am trying to paint a picture as to what i am asking
I do not intend to change the resolver method calls but any inputs to improve my code would be great.