cancel
Showing results for 
Search instead for 
Did you mean: 

How do get the request header details in custom graphQL mutation/query?

   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

How do get the request header details in custom graphQL mutation/query?

I'm planning to send some info in the header when calling the magento graphQL API developed by me in a custom module. So how do I get the header info in the resolve method of my resolver class?

1 REPLY 1

Re: How do get the request header details in custom graphQL mutation/query?

use Magento\Framework\HTTP\PhpEnvironment\Request as EnvRequest;

Then use it to get header value - 

$this->envRequest->getHeader('custom_header');