Skip to content

[6.x] GraphQL introspection config#13880

Merged
jasonvarga merged 9 commits intostatamic:6.xfrom
TimHaerkens:feature/graphql-disable-introspection
Feb 11, 2026
Merged

[6.x] GraphQL introspection config#13880
jasonvarga merged 9 commits intostatamic:6.xfrom
TimHaerkens:feature/graphql-disable-introspection

Conversation

@TimHaerkens
Copy link
Contributor

@TimHaerkens TimHaerkens commented Feb 10, 2026

This PR enables introspection "smartly".

By default it'll be enabled locally. You can override the behavior and enable it per environment using STATAMIC_GRAPHQL_INTROSPECTION_ENABLED=true

If the laravel-graphql package's disable_introspection config is set to true (maybe programmatically?), that'll win and introspection will be disabled.

This also upgrades GraphiQL so that buttons can be disabled when introspection is disabled.

@TimHaerkens TimHaerkens changed the title Add native support for disabling GraphQL introspection [6.x] Add native support for disabling GraphQL introspection Feb 10, 2026
- explorer plugin is conditionally pushed to array
- reference plugin is disabled via prop
- use a null schema which prevents the initial fetch request
@jasonvarga
Copy link
Member

I've changed the config name to be called "enabled" rather than "disabled". The backwards ones always feel weird.

I have adjusted it so that the default behavior is "auto" - it'll be enabled locally but disabled everywhere else.
You can opt into it using the config or env var.

I've disabled various buttons in the GraphiQL page when introspection is disabled. I had to upgrade GraphiQL to do that.

@jasonvarga jasonvarga changed the title [6.x] Add native support for disabling GraphQL introspection [6.x] GraphQL introspection config Feb 10, 2026
@jasonvarga jasonvarga merged commit d17ca21 into statamic:6.x Feb 11, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments