Skip to content

Handle Apollo multipart failed-request inspection safely #5987

Closed

Description

@lbloder

Context

The Apollo 4 and Apollo 5 integrations inspect HTTP response bodies to detect GraphQL errors. Multipart and incremental responses need separate handling so inspection does not buffer, block, or consume streaming bodies.

Scope

  • Define safe failed-request inspection for multipart/incremental responses in sentry-apollo-4 and sentry-apollo-5.
  • Preserve spans and breadcrumbs when body inspection is skipped or unsupported.
  • Decide between skipping failed-request body inspection for multipart responses and parsing multipart parts for GraphQL errors.
  • Add tests covering streaming behavior and body preservation.

WebSocket subscription instrumentation remains out of scope.

Activity

  1. linear-code commented on Aug 25, 2026

    @linear-code
  2. added
    BugIssue type
    and removed on Sep 1, 2026
  3. adinauer commented on Sep 1, 2026

    @adinauer
    Member

    We should treat this as a bug since adding Sentry to Apollo breaks the @defer and @stream features which use multipart responses. We considered adding an option to control whether to inspect multipart requests but decided against it since that means you're choosing at compile / release time whether to use or break the features. Broken defer/stream may mean the customers UI loads very slowly or worst case indefinitely.

    We decided to no longer inspect the response body of multipart responses for errors.

  4. github-actions commented on Nov 11, 2026

    @github-actions
    Contributor

    A PR closing this issue has just been released 🚀

    This issue was referenced by PR #6432, which was included in the 8.64.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions