You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Updates incremental delivery to the pending / incremental / completed / hasNext wire format.
Review scope
Please review only the incremental-delivery wire format and behavior introduced on top of #608. Response-data contracts, generic streaming/middleware behavior, and WebSocket lifecycle are reviewed separately in #611, #612, and #608 and should not be reviewed again here.
These three files were reformatted wholesale by Fantomas even though their dev versions were not Fantomas-formatted, which buried the real change.
Restore formatting to match dev so the diff shows only the @defer label argument and the deferred-test updates.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The reason will be displayed to describe this comment to others. Learn more.
@copilot I thought System.Threading.Channels will help making code with less locks and mutable variables. But I don't see much difference. Is it possible?
@copilot I thought System.Threading.Channels will help making code with less locks and mutable variables. But I don't see much difference. Is it possible?
Partly. A fuller channels rewrite can remove more locks and mutable state, but it would need a broader redesign where one worker owns startup, shutdown, and subscription lifecycle end-to-end. In this PR I kept the remaining lock/mutable pieces because they still coordinate synchronous observer callbacks and cancellation/disposal edges safely.
- Replaced `Error` with `ServerError` for protocol errors in `GraphQLWebsocketMiddleware.fs` to clarify error types.
- Moved the `GQLExecutionResult` active pattern to a new auto-open module in tests; updated all usages to open this module.
- Updated pattern matching to use `.Content` explicitly for clarity.
- Fixed record literal syntax in `WebSockets.fs` `CreateSubsequent`.
- Refactored subscription observer cleanup with `sendAndUnsubscribe`.
- Replaced `awaitBlocking` with `.Wait()` for blocking tasks.
- Updated tests to use the new active pattern module.
- Minor cleanup: removed unused opens, improved logging, clarified matches.
The project’s open-order convention puts System namespaces first; moving Xunit above them makes this file inconsistent. Restore the System/FSharp/external ordering.
Preserve StructNullable list defer coverage in a separate test
This repurposes the only TaskSeq defer test that covered StructNullable (ListOf ...), leaving that supported wrapper combination untested. Keep the struct-nullable test and add the completion-order assertion as a separate fact (or retain the original field definition and initial-data assertion here).
This repurposes the only TaskSeq defer test that covered StructNullable (ListOf ...), leaving that supported wrapper combination untested. Keep the struct-nullable test and add the completion-order assertion as a separate fact (or retain the original field definition and initial-data assertion here).
This repurposes the only TaskSeq defer test that covered StructNullable (ListOf ...), leaving that supported wrapper combina...
Fixed in c9cf0e8. The original defer test now again covers StructNullable (ListOf ...), and the completion-order assertion remains in its own separate fact.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Updates incremental delivery to the
pending/incremental/completed/hasNextwire format.Review scope
Please review only the incremental-delivery wire format and behavior introduced on top of #608. Response-data contracts, generic streaming/middleware behavior, and WebSocket lifecycle are reviewed separately in #611, #612, and #608 and should not be reviewed again here.
Dependency chain: #611 → #612 → #608 → this PR.
Verification
Focused incremental/WebSocket tests passed (85 passed, 1 skipped).
git diff --checkis clean.