Skip to content

refactor(query)!: rename Result option adapters - #136

Merged
braden-w merged 2 commits into
mainfrom
braden-w/rename-result-query-options
Jul 8, 2026
Merged

braden-w merged 2 commits into
mainfrom
braden-w/rename-result-query-options

Conversation

@braden-w

@braden-w braden-w commented Jul 8, 2026 •

Copy link
Copy Markdown
Collaborator

This renames the hook-local Result adapters in wellcrafted/query from queryOptions / mutationOptions to resultQueryOptions / resultMutationOptions.

The old names were too close to TanStack Query's own identity helpers, which meant files that used both APIs had to alias one side. The new names describe the adapter boundary: they take Result-returning queryFn / mutationFn functions and expose TanStack's throwing contract.

The higher-level query factories stay the same. createQueryFactories, defineQuery, defineMutation, and .options still compose through these adapters, so Result unwrapping remains owned in one place.

Breaking change:

-import { queryOptions, mutationOptions } from "wellcrafted/query";
+import { resultQueryOptions, resultMutationOptions } from "wellcrafted/query";

The query README now documents the intended split: use resultQueryOptions / resultMutationOptions for hook-local, reactive, or local-QueryClient operations; use defineQuery / defineMutation for reusable QueryClient-bound handles with imperative helpers. Cache operations stay on QueryClient and are not wrapped.

braden-w added 2 commits July 7, 2026 23:12
…ptions/resultMutationOptions

BREAKING CHANGE: the hook-local Result adapters are now named
resultQueryOptions and resultMutationOptions. defineQuery/defineMutation
and createQueryFactories are unchanged and still compose through them.
Rewrite the query README decision tree around resultQueryOptions/
resultMutationOptions (hook-local/reactive/local-client) vs.
defineQuery/defineMutation (reusable/QueryClient-bound/imperative),
document that cache operations stay on the QueryClient and are not
wrapped, and reframe the naming note now that the result* prefix
removes the TanStack name collision. Update the query-factories skill
and add a minor changeset (0.44.0).
@braden-w
braden-w merged commit e6daffd into main Jul 8, 2026
2 checks passed
@braden-w
braden-w deleted the braden-w/rename-result-query-options branch July 8, 2026 06:19
@braden-w braden-w changed the title refactor(query)!: rename adapters to resultQueryOptions / resultMutationOptions refactor(query)!: rename Result option adapters Jul 8, 2026
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.

1 participant