Is there a way to configure graphql-express to use the graphiqlExpress configured with custom headers for authentication and handling CORS?
@Magneticmagnum I think there's a way to essentially put a string in the header. It's a bit hacky, but it was used for the meteor integration. See passHeader here: https://github.com/apollographql/graphql-server/blob/79458e2ebb687a8dc76ee986ca1e5dd6dd3397eb/packages/graphql-server-module-graphiql/src/renderGraphiQL.ts#L17
If that doesn't do the trick for you, a clearer description of your use-case, and how important it is to you would be great!
Ah, yes, thanks!
It definitely does feel hacky, as you'd have to do something like passHeader: '"token": "xxxxxx", \n "token2": "xxxxxxx"'
But works for me for now! Thanks @helfer
Yeah most people eventually end up setting up a custom GraphiQL, or using the one in the Apollo dev tools.
Most helpful comment
Ah, yes, thanks!
It definitely does feel hacky, as you'd have to do something like
passHeader: '"token": "xxxxxx", \n "token2": "xxxxxxx"'But works for me for now! Thanks @helfer