Skip to content

Support for passing headers

Latest
Compare
Choose a tag to compare
@o-az o-az released this 19 Nov 22:46
· 10 commits to main since this release
9fdf28c

This release adds support for passing headers.

With this release, if you're using a GraphQL endpoint that requires an API key, you are now able pass it in the headers like so:

{
  "X-API-KEY-NAME": "<api-key-name>", 
  "X-API-KEY-VALUE": "<api-key-value>"
}

Example

{ 
  "X-API-KEY": "Authorization", 
  "X-API-VALUE": "Bearer 1234567890"
}

To use the playground/graphiql endpoint when you need to pass headers (i.e., api key), you can curl the endpoint and save the response locally to an html file then simply open the file in your browser.

Example

curl --request 'GET' \
  --url 'https://introspect.lagon.dev/graphiql/https://spacex-production.up.railway.app' \
  --header 'X-API-KEY-NAME: Authorization' \
  --header 'X-API-KEY-VALUE: Bearer loremipsum420' \
  --output 'playground.html'