Tour-style getting started and deeper command, query and testing guides - #36
Merged
Merged
Conversation
shouldHaveValidationErrorFor matches a message fragment, so asserting 'title' passed only because the message happened to contain the word. Assert the member instead, in the sample spec and in Your first command, which also shows the generated-metadata line the real context uses.
Open on the reader's scenario, show the full Tasks main.ts, and move the .NET comparison to a closing table. The new Continue in the browser lesson generates the Tasks proxies and calls the server from a React page with the published @cratis/arc.react hooks.
Command validation fixes the sample import, adds a rejection-phase table, and shows readModelForValidation for rules that need stored state. Command filters now says model-bound commands have no global filter and lists the per-command alternatives.
Model-bound queries now explain the discovery contract, parameter binding with and without generated metadata, async methods, and what absence and failure return. Observable queries fix the decorator claim and add sections on missing documents, subscription lifetime, paging, and authorization.
Two lessons modeled on the .NET testing tutorials: test a command's decision directly and its pipeline through CommandScenario, and test operations, failure, and reverse-order compensation. Testing commands gains a Test authorization section, and the overview and query pages show the sample contexts as they are, with generated metadata.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changed
Fixed
shouldHaveValidationErrorForMember('title')instead of matching part of a message.{ observable: true }, and explains that the React provider's default SSE hub needs an authenticated caller on this server.