Skip to content
Deployment hardening

GraphQL introspection open in production

Open introspection lets anyone list your GraphQL types, fields and mutations, which makes your API easier to explore but does not by itself bypass authorization. Disable it in production if clients do not need it, and make sure every resolver checks who is asking.

Check your app free, first fix free
By Brennan ZamboUpdated
In short

Introspection exposes the shape of your API, including internal or forgotten fields. It is a map, not a key. Turning it off reduces casual discovery but does not protect a resolver that skips authorization, because fields can still be guessed. Check access per resolver first, then decide on introspection. ProofForge does not run a dedicated check for this.

What introspection actually reveals

GraphQL servers can answer a special query that describes the whole schema: types, fields, arguments and mutations. Tools like GraphiQL use it for autocomplete. In production it tells a stranger exactly which operations exist, including ones your interface never calls, such as an old admin mutation or an internal reporting field.

That is useful information for an attacker, but it is not access. If every resolver verifies the session and ownership, knowing a field name gains nothing. If a resolver trusts its arguments, introspection simply makes the weak field easier to find. Disabling introspection without fixing such a resolver is hiding, not fixing; field suggestions in error messages can still leak names.

Check your own endpoint

Run this only against an API you own or have permission to test:

bash
curl -s https://your-app.example/graphql \
  -H "content-type: application/json" \
  --data '{"query":"{ __schema { queryType { name } } }"}'

A response containing a queryType name means introspection is enabled for anonymous callers. An error or empty result means it is disabled or protected at that endpoint. Hosted backends sometimes expose a separate GraphQL URL, so test the one your frontend actually calls.

Turn it off where clients do not need it

Most servers have an option. For example, with Apollo Server:

ts
const server = new ApolloServer({
  typeDefs,
  resolvers,
  introspection: process.env.NODE_ENV !== "production",
});

If you use a hosted GraphQL layer, use its documented setting rather than a proxy hack. Public APIs intended for third-party developers may reasonably keep introspection on; then the schema should contain nothing you would not publish in documentation.

The part that matters more

List each query and mutation and write down who may call it. Then test one as a signed-out visitor and as a second account that does not own the record. Remove dead fields rather than leaving them unauthenticated.

What ProofForge does and does not check here

ProofForge does not currently perform a dedicated GraphQL introspection check. This is a manual guide, not a claim of detection: a clean ProofForge report says nothing either way about this issue. The public scan covers the areas listed on the methodology page, such as exposed files, bundle secrets, security headers, CORS and selected database access. Use the steps above on an app you own or have permission to test, and keep your own notes as evidence.

Turn the check into a release decision

Keep a small record of the production URL, the time you checked it, the exact finding and the action you took. A local preview and a deployed application can have different environment variables, response headers and database projects. After a repair, deploy the intended version and check the public address again. Do not assume that changing a repository file changed the live system.

Read coverage as carefully as the score. A timed-out asset, an ambiguous backend configuration or a request that could not safely establish access should remain unknown. It should not disappear from your release notes merely because there is no red finding. If a check was not completed, decide who will review it and what additional evidence is needed.

ProofForge's free report includes the first fix. The $9 Fix Report unlocks all findings' available repair guidance and builder prompts, with a PDF and private report link. Fix + Guard costs $29 once and adds builder rules, on-demand deploy-hook scans for 30 days and four weekly rechecks you start yourself. These are different deliverables, not different promises that an application is completely secure.

Keep private report URLs out of public issues and commits. If you need shareable evidence, use the owner-verification and publication flow for an eligible receipt. A signature protects the recorded assessment against undetected changes; it does not make the assessment exhaustive, prove a business outcome, or show that a later deployment still matches an earlier result.

Questions builders ask

Is open introspection a vulnerability?
It is an information exposure, often rated low on its own. The real risk is any resolver that lacks authorization, which introspection makes easier to find.
If I disable introspection, is my API safe?
No. Field names can be guessed or leaked through suggestions and client bundles. Every resolver still needs its own access check.
Does ProofForge test GraphQL endpoints?
Not currently. This is a manual guide. The scanner focuses on the public checks listed on its methodology page.

Continue with a related guide

Sources

Read-only, about a minute

Scan your app free

See what your live app ships to every visitor, with the first fix free. A clean scan is not a full audit. Run it only on an app you own or have permission to test.

Scan your app free
All guides