You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GraphiQL.createFetcher function supports an optional headers argument to allow HTTP headers that are sent when doing endpoint requests (see https://github.com/graphql/graphiql/blob/main/packages/graphiql-toolkit/docs/create-fetcher.md#headers). It would be nice if there was a way to configure this when creating it, ideally passed from the playground.Handler or similar Go endpoint. While headers can be edited in the UI, for our application we generate the necessary headers programmatically already, and being able to pass them in when creating the playground handler would save the developer a copy/paste step.
Happy to submit a PR to implement this.
The text was updated successfully, but these errors were encountered:
mihaip
added a commit
to mihaip/gqlgen
that referenced
this issue
Jul 28, 2023
The
GraphiQL.createFetcher
function supports an optionalheaders
argument to allow HTTP headers that are sent when doing endpoint requests (see https://github.com/graphql/graphiql/blob/main/packages/graphiql-toolkit/docs/create-fetcher.md#headers). It would be nice if there was a way to configure this when creating it, ideally passed from theplayground.Handler
or similar Go endpoint. While headers can be edited in the UI, for our application we generate the necessary headers programmatically already, and being able to pass them in when creating the playground handler would save the developer a copy/paste step.Happy to submit a PR to implement this.
The text was updated successfully, but these errors were encountered: