Skip to content

Fix top-level deferred patch registration#694

Draft
pavelglac with Copilot wants to merge 2 commits into
user/pavelglac/deferfrom
copilot/fix-code-review-comment
Draft

Fix top-level deferred patch registration#694
pavelglac with Copilot wants to merge 2 commits into
user/pavelglac/deferfrom
copilot/fix-code-review-comment

Conversation

Copilot AI commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Top-level @defer patches could be dropped when enableEarlyExecution was disabled and initial field execution completed synchronously. buildResponse observed no registered subsequent payloads and returned a non-incremental result before deferred patches were started.

  • Execution ordering

    • Register top-level deferred patches before calling buildResponse for queries and mutations when early execution is disabled.
    • Reuse the existing patch execution helper to keep behavior aligned with early execution paths.
  • Regression coverage

    • Add coverage for a synchronous top-level selection with an async deferred field:
{
  critical
  ... @defer {
    deferred
  }
}

This now produces an initial incremental response with hasNext: true, followed by the deferred payload.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI changed the title [WIP] Fix code based on review comment Fix top-level deferred patch registration Jul 14, 2026
Copilot AI requested a review from pavelglac July 14, 2026 12:39
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.

2 participants