tartiflette-aiohttp icon indicating copy to clipboard operation
tartiflette-aiohttp copied to clipboard

GraphiQL custom header support

Open upcFrost opened this issue 3 years ago • 5 comments

Hi,

Upstream GraphiQL (https://github.com/graphql/graphiql/tree/main/packages/graphiql) seem to support setting custom headers (e.g. authorization) when the headerEditorEnabled option is set, it provides additional tab similar to "Query Variables".

Is it possible to add similar headers editor tab to the GraphiQL template used in tartiflette-aiohttp?

upcFrost avatar Sep 30 '20 08:09 upcFrost

@upcFrost If I understand correctly, you want us to update our integration of graphiql to the latest upstream so you could use the graphiql_options to pass {"headerEditorEnabled": True} to it ?

abusi avatar Sep 30 '20 09:09 abusi

yes

upcFrost avatar Sep 30 '20 09:09 upcFrost

though I think the current template (https://github.com/tartiflette/tartiflette-aiohttp/blob/master/tartiflette_aiohttp/_graphiql.html) does not support it

upcFrost avatar Sep 30 '20 09:09 upcFrost

@upcFrost If you think you can do it, i'll gladly approve and release a new version. I may have some time to do it next week.

abusi avatar Sep 30 '20 09:09 abusi

Ok, I'll try to, probably in the next few days

upcFrost avatar Sep 30 '20 09:09 upcFrost