GraphQL introspection and explorers
An open GraphQL schema lists every query and mutation you have, including admin ones. Turn it off in production.
What it is
Kompile asks your /graphql endpoint one read-only question (the name of its query type) and looks for a GraphiQL, Playground or Apollo Sandbox page.
Why it matters
Introspection gives attackers a complete map of your API, and an explorer makes trying every operation effortless.
How to fix it
new ApolloServer({ schema, introspection: process.env.NODE_ENV !== "production" });
createYoga({ schema, graphiql: false, plugins: [useDisableIntrospection()] });
If your API is meant to be public, introspection is fine. Make sure every resolver still checks who is asking.
Does your site have this problem?
Kompile Scan checks for this and the other problems in these guides in under a minute. Free for one site.