Skip to content

Durisvk/graphiql

 
 

Repository files navigation

GraphiQL - With Custom Headers

Checkout the GraphiQL documentation on https://github.com/graphql/graphiql

To allow Custom Headers feature your graphQLFetcher might take an extra argument and supply it instead of headers:

function graphQLFetcher(graphQLParams, myCustomHeaders) {
  return fetch(window.location.origin + '/graphql', {
    method: 'post',
    headers: myCustomHeaders,
    body: JSON.stringify(graphQLParams),
  }).then(response => response.json());
}

Copyright (c) 2015, Facebook, Inc. All rights reserved.

About

An in-browser IDE for exploring GraphQL.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 73.5%
  • CSS 19.8%
  • HTML 5.5%
  • Shell 1.2%