Khan / genqlient

a truly type-safe Go GraphQL client
MIT License
1.07k stars 107 forks source link

Ability to add headers to the HTTP request. #249

Closed robstove closed 1 year ago

robstove commented 1 year ago

Is your feature request related to a problem? Please describe. We need to be able to provide certain headers to the request for the graphql endpoint (e.g. auth token). This appears to be missing.

Describe the solution you'd like Add ability to provide http headers to the request.

Describe alternatives you've considered It doesn't appear that the request is made available at any point in the request life cycle.

Additional context na

Much appreciated...

benjaminjkraft commented 1 year ago

Check out the documentation here: https://github.com/Khan/genqlient/blob/main/docs/FAQ.md#-use-an-api-that-requires-authentication

robstove commented 1 year ago

Thanks @benjaminjkraft. That should do it.