Ability to disable GraphQL Explorer endpoint

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Proposal

Administrators should be able to disable the GraphQL Explorer endpoint (/-/graphql-explorer). This should be possible to disable via the UI. GraphQL Explorer is a lightweight version of GraphiQL that allows users to test and submit GraphQL queries.

/-/graphql-explorer is currently a route that uses the graphiql gem (linked here). This route should check if the feature is disabled or enabled before mounting.

When introspection queries are disabled, GitlabSchema should have disable_introspection_entry_points set to true https://graphql-ruby.org/schema/introspection#disabling-introspection to fully disable the ability for GraphQL introspection queries, even outside of the GraphiQL Explorer route.

The administrator UI should present an option to enable or disable.

Edited by 🤖 GitLab Bot 🤖