incrementalDelivery: use single execute function with directives as flags
The use of new experimental functionality triggered by directives does not need a separate runtime flag. The directives themselves are the flags and all operations passed to execute are assumed to be valid.
Using TS conditional types, when new generic TMaybeIncremental parameter is set to true, return type of execute will be either an ExecutionResult or an IncrementalExecutionResultMap containing an initialResult and a generator of subsequentResults. While incremental delivery is designated as experimental, TMaybeIncremental will default to false. When incremental delivery is merged into the spec, it may be useful to adjust the default to true.
Hi @yaacovCR, I'm @github-actions bot happy to help you with this PR 👋
Supported commands
Please post this commands in separate comments and only one per comment:
-
@github-actions run-benchmark- Run benchmark comparing base and merge commits for this PR -
@github-actions publish-pr-on-npm- Build package from this PR and publish it on NPM
My current preferred alternative to #3722 / #3727 / #3726 @robrichard @glasser @IvanGoncharov
Even if we don't take this solution in whole, we might want to extract out the removal of the unnecessary singleResult wrapper and just add that to #3722
Deploy Preview for compassionate-pike-271cb3 ready!
| Name | Link |
|---|---|
| Latest commit | 471098405804639089a1d112152498693273f22e |
| Latest deploy log | https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/63203dfa5d397700081f04a4 |
| Deploy Preview | https://deploy-preview-3732--compassionate-pike-271cb3.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Deploy Preview for compassionate-pike-271cb3 ready!
| Name | Link |
|---|---|
| Latest commit | 418b3a7a3f75ae87b239b492cc6adf4b54aa9628 |
| Latest deploy log | https://app.netlify.com/sites/compassionate-pike-271cb3/deploys/632966152098b100081722a9 |
| Deploy Preview | https://deploy-preview-3732--compassionate-pike-271cb3.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site settings.
Even if we don't take this solution in whole, we might want to extract out the removal of the unnecessary
singleResultwrapper and just add that to #3722
This portion has been extracted out to #3733
Closing in favor of #3722.