Skip to content

Tour-style getting started and deeper command, query and testing guides - #36

Merged
woksin merged 9 commits into
mainfrom
docs/core-tour
Sep 25, 2026
Merged

woksin merged 9 commits into
mainfrom
docs/core-tour

Conversation

@woksin

@woksin woksin commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Changed

  • Getting started is a guided tour of the Tasks sample, with the complete entry point explained line by line, and continues in the browser: generate the proxies and build a small React page that registers tasks and shows them live.
  • The command, query, observable query, authorization and testing guides now cover where each kind of rejection belongs, validating against read models, query return types and absence, paging and authorizing live queries, query ownership, testing authorization, and new lessons on testing a command's decision and testing command operations with compensation.
  • Command filters document that model-bound commands have no global filter and what to use instead.

Fixed

  • The first-command example asserts the failing member with shouldHaveValidationErrorForMember('title') instead of matching part of a message.
  • The observable query guide no longer claims the sample needs { observable: true }, and explains that the React provider's default SSE hub needs an authenticated caller on this server.

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.
@woksin woksin added the no-release No consumer-facing artifact changes label Sep 25, 2026
@woksin
woksin merged commit 91bd698 into main Sep 25, 2026
3 checks passed
@woksin
woksin deleted the docs/core-tour branch September 25, 2026 05:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-release No consumer-facing artifact changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant