Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

[FEATURE REQUEST]: Ability to include HTTP headers #50

Open
go4cas opened this issue Jan 17, 2019 · 1 comment
Open

[FEATURE REQUEST]: Ability to include HTTP headers #50

go4cas opened this issue Jan 17, 2019 · 1 comment

Comments

@go4cas
Copy link

go4cas commented Jan 17, 2019

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'
  }
}

#6 explains how to implement this by extending the HttpGraphQLClient, but I think it'll be a great addition to the core lib.

@Yogu
Copy link
Member

Yogu commented Jan 17, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants