@beignet/react-query 0.0.24 → 0.0.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @beignet/react-query
2
2
 
3
+ ## 0.0.25
4
+
5
+ ### Patch Changes
6
+
7
+ - 7c83da7: Refresh package-shipped TanStack Intent skills to match current Beignet app structure, generators, route helpers, and React Query cache helpers.
8
+
3
9
  ## 0.0.24
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -23,8 +23,9 @@ This package requires TypeScript 5.0 or higher for proper type inference.
23
23
 
24
24
  This package ships a TanStack Intent skill for coding agents:
25
25
  `@beignet/react-query#client`. Load it when adding typed client setup, React
26
- Query options, feature client helpers, hooks, cache invalidation, server
27
- prefetching, or client/server boundary fixes in a Beignet app.
26
+ Query options, infinite queries, feature client helpers, hooks, cache keys,
27
+ cache invalidation, server prefetching, idempotent mutations, or
28
+ client/server boundary fixes in a Beignet app.
28
29
 
29
30
  ## Setup
30
31
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@beignet/react-query",
3
- "version": "0.0.24",
3
+ "version": "0.0.25",
4
4
  "type": "module",
5
5
  "description": "TanStack Query integration for Beignet",
6
6
  "main": "./dist/index.js",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: client
3
- description: "Build Beignet browser client and TanStack Query integration with @beignet/react-query: createClient, createReactQuery, queryOptions, mutationOptions, cache keys, feature client helpers, hooks, QueryClientProvider, server prefetching, and client/server boundary fixes. Use when adding or debugging React Query usage in a Beignet app."
3
+ description: "Build Beignet browser client and TanStack Query integration with @beignet/react-query: createClient, createReactQuery, queryOptions, mutationOptions, infiniteQueryOptions, cache keys and filters, feature client helpers, hooks, QueryClientProvider, server prefetching, idempotent mutations, and client/server boundary fixes. Use when adding or debugging React Query usage in a Beignet app."
4
4
  ---
5
5
 
6
6
  # Beignet React Query Client
@@ -98,10 +98,19 @@ Call server behavior through Beignet contracts and typed clients.
98
98
  - Use `queryOptions(...)` so options work with `useQuery`, `prefetchQuery`,
99
99
  `fetchQuery`, and server prefetching.
100
100
  - Use `mutationOptions(...)` with `useMutation`.
101
- - Use `rq(contract).invalidate(queryClient)` or the app's existing key helper
102
- after successful mutations.
101
+ - Use `infiniteQueryOptions(...)` with `useInfiniteQuery` for paginated
102
+ contracts. Prefer static `path`/`query` plus `page(...)`; if every page needs
103
+ fully dynamic params, pass a custom `key`.
104
+ - Use `rq(contract).key(...)`, `filter(...)`, `contractFilter(...)`, and
105
+ `namespaceFilter(...)` when the app needs explicit cache keys or invalidation
106
+ filters.
107
+ - Use `rq(contract).invalidate(queryClient, params?, options?)` or the app's
108
+ existing key helper after successful mutations.
103
109
  - If the app configures `createReactQuery(apiClient, { keyHeaders })`, preserve
104
110
  that when adding helpers so tenant or header-scoped caches stay distinct.
111
+ - Contracts with idempotency metadata get one generated idempotency key per
112
+ `mutate(...)` variables object, stable across TanStack retry attempts. Pass
113
+ `idempotencyKey` in mutation variables only when the app must control it.
105
114
  - Keep business validation in use cases. Client validation is for UX and early
106
115
  feedback.
107
116