-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option to enable GraphQL introspection in production #8014
Conversation
@dthyresson mind taking a look at this? I thought to discuss with you first before doing changes but it was minor change, so 🤷♂️ |
16 replays were recorded for 08cc89f.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This override option makes sense to me. But, I was wondering if it should be allow Introspection
and default to true is isDev and then set if want to say y/n.
- If `allowIntrospection` is undefined, allow instrospection only in dev env. - If we receive explicit `true` or `false`, we honor that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested a "caution" admonition in the docs.
Otherwise LGTM.
@BurnedChris is being able to allow introspection on a properly public GraphQL api something you needed? I think it was -- so just an FYI. |
Co-authored-by: David Thyresson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@callingmedic911 I think we need one more small docs update here: https://deploy-preview-8014--redwoodjs-docs.netlify.app/docs/canary/security#disable-introspection-and-playground
best practices for deploying a GraphQL Server call to disable these in production, RedwoodJS only enables introspection and the playground when running in development.
Maybe a :::note
to link to how to enable in prod if want.
Users can enable introspection in production by setting the allowIntrospectionInProduction option to true. This option is a boolean and is optional. If it is not
provided or is set to false, introspection will remain disabled in production.
Also updated the docs.