SpiffInc / absinthe_compose

A tool for composing graphql schemas together
5 stars 2 forks source link

Add support for forwarding headers to the external client #4

Open feliperenan opened 3 years ago

feliperenan commented 3 years ago

The use case is that the external client need some extra headers to proper validate the incoming request, in our case the Authorization header needs to be forwarded, and since it is dynamic, it need to be done at runtime level.

What we suggested is something like this:

Then we can take this headers_to_forward when resolving the query and merge in this opts which will be send to the HTTP client.

Does that make sense?

feliperenan commented 3 years ago

Another option would be just changing this library to get custom opts from the context and instruct developers to build this plug on their own application.