graphql-weaver
graphql-weaver copied to clipboard
[FEATURE REQUEST]: Ability to include HTTP headers
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.
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.