Skip to content

Conversation

@yaacovCR
Copy link
Contributor

@yaacovCR yaacovCR commented Dec 3, 2025

This PR replaces our IncrementalGraph implementation with a formalized WorkQueue construct with its own spec-like behavior.

The PR also enhances Queues to be more Repeater-like, handling pushing async values in order, as well as backpressure, even while maintaining the ability to be eager and batching results.

In terms of test changes, the re-architecture:

  • most significantly, demonstrates how we can transparently manage backpressure with streams even while allowing early execution. The amount that a producer is allowed to run ahead of the consumer is configurable, currently on a per-overall execution basis.
  • incidentally coalesces some stream items together where possible
  • uncovers at least one stream bug, as demonstrated in the additional test
  • avoids some tricky logic regarding errors that bubble to the root of a deferred fragment or stream if there are pre-existing errors

In terms of execution/types changes, the re-architecture:

  • allows for removal of many of the confusing intermediate result types we had needed previously.
  • unifies handling of sync and async stream queue creation
  • overall simplifies the spec changes needed within execution

This version comes with a specification describing behavior of a generic incremental WorkQueue that should motivate the execution changes necessary to get incremental delivery merged within the spec.

@robrichard @brainkim

@yaacovCR yaacovCR requested a review from a team as a code owner December 3, 2025 14:15
@yaacovCR yaacovCR added the PR: feature 🚀 requires increase of "minor" version number label Dec 3, 2025
@vercel
Copy link

vercel bot commented Dec 3, 2025

@yaacovCR is attempting to deploy a commit to the The GraphQL Foundation Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

PR: feature 🚀 requires increase of "minor" version number

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant