-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Description
New Issue Checklist
- Report security issues confidentially.
- Any contribution is under this license.
- Before posting search existing issues.
Issue Description
The GQL introspection endpoint is blocked for environments with NODE_ENV=production even when requesting it with masterkey.
As I understand it from this PR introspection should always work when masterKey is used, but since the introspection boolean on ApolloServer defaults to false the request is blocked even though it's not stopped by the introspection plugin.
Steps to reproduce
Run server without setting graphQLPublicIntrospection to true, set NODE_ENV to production and run an introspection request with master key.
Actual Outcome
{"errors":[{"message":"GraphQL introspection is not allowed by Apollo Server, but the query contained __schema or __type. To enable introspection, pass introspection: true to ApolloServer in production","locations":[{"line":2,"column":3}],"extensions":{"validationErrorCode":"INTROSPECTION_DISABLED","code":"GRAPHQL_VALIDATION_FAILED"}}]}
Expected Outcome
< introspection result >
Environment
7.5.3
Server
- Parse Server version:
7.5.3 - Operating system:
MacOS - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Heroku
Database
- System (MongoDB or Postgres):
Mongo - Database version:
7 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
MongoDB Atlas
Client
- SDK (iOS, Android, JavaScript, PHP, Unity, etc):
FILL_THIS_OUT - SDK version:
FILL_THIS_OUT