-
Notifications
You must be signed in to change notification settings - Fork 348
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
Configuring introspection on/off via .meshrc.yml file #3433
Comments
It would be nice if I could configure a custom function to decide whether the introspection can or cannot be done. For example, my function could check if the user sent a specific authorization token, etc. |
I second that an For the time being I managed to disable it with @envelop/disable-introspection. Here's my setup: // lib/plugins/index.ts
import { Plugin } from '@envelop/core'
import { useDisableIntrospection } from '@envelop/disable-introspection'
const plugins: Plugin[] = [
useDisableIntrospection()
]
export default plugins # .meshrc.yml
serve:
playground: false # Ideally we would look at node_env or environment variable to set this to true for non-prod, and true for prod
additionalEnvelopPlugins: './lib/plugins/index.ts' I haven't yet solved how to pass in a boolean environment variable to playground, since env variables are always strings. |
Is your feature request related to a problem? Please describe.
Disabling GraphQL introspection.
We'd currently like to be able to run
graphql-mesh
with introspection on/off based on context/environment.Having looked through it would appear this is possible via
graphql-helix
(as outlined here) but isn't exposed throughgraphql-mesh
(validationRules
isn't passed here).Describe the solution you'd like
Be able to pass configure introspection on/off via the
.meshrc.yml
file.Describe alternatives you've considered
The one thing I've spotted is the ability to point introspection at a JSON file via config. I guessing this could be an empty JSON file(?) but it seems like a work-around. However, this doesn't seem to be available with grpc sources/I'm finding it a bit hard to decipher where exactly it would need to be present within the
.meshrc.yml
file from the documentation.Hopefully I'm not missing something obvious.
Thanks
The text was updated successfully, but these errors were encountered: