Skip to content

GraphQL tool calls can wait indefinitely for upstream responses #1414

Description

@morluto

Problem

GraphQL tool invocations have no plugin-level deadline. If an upstream accepts the request but never completes its response, the tool call remains pending until an outer host or platform limit terminates it.

This differs from the bounded invocation behavior in the OpenAPI and MCP plugins and does not return a GraphQL-specific, actionable failure to the caller.

Reproduction

  1. Start a GraphQL endpoint that sends 200 response headers and begins a JSON response body without completing it.
  2. Invoke a GraphQL tool against that endpoint.
  3. Observe that the invocation remains pending and the upstream socket stays open.

In a regression harness with an independent one-second guard, the current implementation reaches that guard after about one second instead of returning a GraphQL result.

Expected behavior

  • GraphQL requests have a bounded invocation deadline that covers response headers and the response body.
  • Reaching the deadline interrupts the HTTP request and closes the upstream socket.
  • Direct SDK callers receive a typed timeout failure.
  • Tool callers receive a stable, actionable timeout code and message.

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