graphql-weaver icon indicating copy to clipboard operation
graphql-weaver copied to clipboard

[FEATURE REQUEST]: Ability to include HTTP headers

Open go4cas opened this issue 6 years ago • 1 comments

I think it would be super useful if one could include headers when defining the endpoints.

Something like:

endpoints: [{
  namespace: 'model',
  typePrefix: 'Model',
  url: 'http://localhost:8080/graphql' // url to a GraphQL endpoint,
  headers: {
    'Authorization': 'Bearer **********************',
    'content-type': 'application/json'
  }
}

https://github.com/AEB-labs/graphql-weaver/issues/6 explains how to implement this by extending the HttpGraphQLClient, but I think it'll be a great addition to the core lib.

go4cas avatar Jan 17 '19 05:01 go4cas

I think that's a good idea, and also a good first issue. I'd love to merge a pull request that implements this. If you have question regarding this, feel free to ask.

Yogu avatar Jan 17 '19 20:01 Yogu