Skip to content

feat: add QoraClient.mutate() and context.mutate() for direct cache writes (#20) - #44

Open
donfreddy wants to merge 1 commit into
mainfrom
feat/global-mutate-api-20
Open

feat: add QoraClient.mutate() and context.mutate() for direct cache writes (#20)#44
donfreddy wants to merge 1 commit into
mainfrom
feat/global-mutate-api-20

Conversation

@donfreddy

Copy link
Copy Markdown
Collaborator

Closes #20

Description

Adds QoraClient.mutate<T>(key, data) and context.mutate<T>(key, data) for optimistic cache writes from anywhere in the widget tree.

Changes

  • QoraClient.mutate<T>(key, data) : convenience alias for setQueryData -- write directly to cache without a fetcher
  • context.mutate<T>(key, data) : BuildContext extension shorthand, triggers UI updates for all active subscribers
  • Tests (4 test cases): stream update on mutate, alias equivalence, new entry creation, multiple subscribers
  • Updated extension docs to showcase context.mutate

@donfreddy
donfreddy force-pushed the feat/global-mutate-api-20 branch from 0aeedcc to 5bffebf Compare July 15, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add global mutate API (context.qora.mutate)

1 participant