Skip to content

Explorer tab fails silently when introspection is disabled on server #1818

Description

@KlementMultiverse

Problem

When a GraphQL server has introspection disabled (a security best practice in production), the Apollo Client Devtools Explorer tab fails to load without surfacing an error to the user. The extension silently falls back to showing an empty state, making it appear broken rather than communicating that introspection is unavailable.

This is distinct from #1796 (request to allow disabling introspection) — this issue is about handling the case when introspection is disabled on the server.

Why this matters

Production GraphQL servers commonly disable introspection for security reasons. When developers use devtools against these servers, they get no feedback about why the Explorer isn't working. They often assume the devtools are broken, which hurts adoption and creates support burden.

Current behavior

  1. User opens Apollo devtools against a server with introspectionFromSchema disabled
  2. src/bridge/index.ts calls introspection during initialization
  3. The introspection query fails (typically returning a GraphQL error)
  4. The error is swallowed somewhere in the initialization chain
  5. src/panel/components/Explorer.tsx renders an empty state with no explanation

See #1791 (circular structure error) and #1801 (devtools fails to connect) — both report initialization failures that may be related to this same underlying issue.

What good looks like

  1. When introspection fails during bridge initialization, capture the error
  2. Pass the error state to the Explorer component via bridge context
  3. Display a user-facing message: "GraphQL introspection is disabled on this server. The Explorer requires introspection to provide autocompletion and validation."
  4. Provide a fallback: allow users to manually paste a schema or use a partial schema they provide
  5. Log the introspection error (not as a fatal error, but as an informational message) so developers know why the feature isn't working

Acceptance criteria

  • src/bridge/index.ts captures introspection failures and propagates them to the panel
  • src/panel/components/Explorer.tsx displays an error state when introspection is unavailable
  • Error message clearly explains the cause (introspection disabled) rather than generic "failed to load"
  • Devtools remain functional — queries can still be made, just without autocompletion/validation
  • Existing introspection caching behavior is preserved when introspection succeeds

Contributed by Klement Gunndu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions