Skip to content

early execution and merge#680

Open
pavelglac wants to merge 18 commits into
mainfrom
user/pavelglac/defer
Open

early execution and merge#680
pavelglac wants to merge 18 commits into
mainfrom
user/pavelglac/defer

Conversation

@pavelglac

@pavelglac pavelglac commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Adds defer optimizations for Supermassive:

  • Early execution of deferred fragments, similar to GraphQL 17 behavior.
  • Merging resolved deferred patches into the initial response before sending it.
  • Optional timed batching for incremental patches, useful when a deferred fragment appears across many list items, to reduce the number of follow-up responses.

pavelglac and others added 15 commits June 22, 2026 09:20
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
const incremental = getCompletedIncrementalResults(exeContext);
const batchTimeout = exeContext.enableIncrementalPayloadBatching;
const incremental =
batchTimeout !== undefined

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot it should typeof check for number.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in 50a55c2: switched the batching guards to runtime number checks (typeof batchTimeout === "number") before using the timeout value.

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