Skip to content

fix: add timeline trace visibility for failed GraphQL introspection queries#9736

Open
BloodShop wants to merge 2 commits intoKong:developfrom
BloodShop:fix/introspection-trace-visibility
Open

fix: add timeline trace visibility for failed GraphQL introspection queries#9736
BloodShop wants to merge 2 commits intoKong:developfrom
BloodShop:fix/introspection-trace-visibility

Conversation

@BloodShop
Copy link

Summary

This PR fixes issue #5776 by making GraphQL introspection query traces available when they fail, enabling users to debug authentication and server issues.

Problem

When GraphQL introspection queries failed, users had no access to request/response details, making it impossible to debug authentication issues, server errors, or misconfigurations.

Solution

  • Enhanced all error paths in fetchGraphQLSchemaForRequest to include response data containing timeline paths
  • Added a "Show Trace" button that appears when introspection fails with available timeline data
  • Integrated the existing ResponseTimelineViewer component to display full request/response details inline
  • Enhanced error tooltips to indicate when debugging data is available

Benefits

  • Users can now see request headers, authentication details, and server responses for failed introspection queries
  • Easy debugging of Bearer Auth issues, CORS problems, and server-side introspection restrictions
  • Zero breaking changes - existing functionality remains unchanged
  • Consistent UI using existing Insomnia components

Testing

Tested with GraphQL endpoints that:

  • Return 401 for introspection queries with missing auth
  • Return 400 for disabled introspection
  • Return GraphQL errors in response body

Files Modified

  • packages/insomnia/src/ui/components/editors/body/graph-ql-editor.tsx

Fixes #5776

…ueries

- Enhanced fetchGraphQLSchemaForRequest to include response data in all error cases
- Added 'Show Trace' button that appears when introspection fails with timeline data
- Integrated ResponseTimelineViewer to display request/response details inline
- Users can now debug authentication issues, server errors, and other introspection failures
- Maintains backward compatibility with existing error handling

Fixes Kong#5776
@CLAassistant
Copy link

CLAassistant commented Mar 22, 2026

CLA assistant check
All committers have signed the CLA.

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.

Introspection query trace not available after it fails

2 participants