Skip to content

Allow execution to be cancelled #3764

Closed
@glasser

Description

@glasser

Once execution begins, there's no way to stop it from running until completion.

However, servers may want to be able to stop execution. For example:

  • Servers may have a response timeout; there's no use continuing to execute fields after the server has returned a "request timed out" error.
  • Servers may want to avoid OOM attacks via nested lists by dynamically enforcing a maximum number of resolved fields and cancelling once too many fields have been resolved.

It would be helpful if execute (and experimentalExecuteIncrementally, etc) had a mechanism for cancelling execution. This could be based on web-style AbortSignal/AbortController or a different API style.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions