GraphiQL does not work with helmet on
See original GitHub issueHi. I was trying to get GraphiQL to work but it got blocked with Content Security Policy errors as seen below:
I disabled fastify-helmet
and was able to get it working properly. Am I missing some config here?
There are similar issues, but with playground though: https://github.com/graphql/graphql-playground/issues/1283#issuecomment-703631091
I guess its better to use local js files with GraphiQL rather than files from the CDN (I may be wrong here). Thanks.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:12 (3 by maintainers)
Top Results From Across the Web
Express: GraphiQL doesn't work with Helmet middleware #4648
I'm using "apollo-server-express": "^2.18.2" and helmet middleware. Apollo GraphiQL scripts won't load when helmet is loaded. Expected behavior:
Read more >Usage of helmet in default configuration blocks graphql ...
I am using graphQL and helmet at the same time. I think which is stopping my graphQL api playground. THIS MY CODE I...
Read more >Proper helmet settings that allow Apollo Sandbox to work - Help
Hi! When we enable helmet (with the default configuration, app.use(helmet()), we are no longer able to use Apollo Sandbox.
Read more >Using PostGraphile as a Library
Library mode is the most popular way of running PostGraphile; it gives more power than using the CLI (see CLI usage), but is...
Read more >The Anatomy of a GraphQL Request – The Guild
If there is any typo or syntax error, this phase will yield GraphQLErrors for each of those issues and pass them back to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@tvvignesh As of version 1.0.0, you can pass a
nonce
value torenderGraphiQL
. I’ve also added a CSP example here that shows how to integrate helmet.Yes I am considering a similar approach for
renderGraphiQL
although it wouldn’t use that transform.