You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Optional**, represents the options of the [_useInfiniteQuery(...) 🌴_](https://tanstack.com/query/latest/docs/framework/react/reference/useInfiniteQuery) Hook
-**Optional**, represents the [_Query Filters 🌴_](https://tanstack.com/query/latest/docs/framework/react/guides/filters#query-filters)
22
22
to be used. If not provided, _all_ normal and _Infinite_ queries will be used to filter.
23
-
-`filters.parameters: { path, query, header }` will be used for filtering queries by parameters
23
+
-`filters.parameters: { path, query, header, body }` filters queries by operation parameters.
24
+
- For operations generated with `--queryable-write-operations`, `body` can be included in `filters.parameters` and participates in query cache identity.
24
25
-`filters.infinite: boolean` will be used to filter infinite or normal queries
25
26
-`filters.queryKey: QueryKey` will be used for filtering queries by _QueryKey_ instead of parameters
26
27
-`filters.queryKey` and `filters.parameters` are mutually exclusive
-**Required**, represents the options for queries, see [_useQueries(...) 🌴_](https://tanstack.com/query/latest/docs/framework/react/reference/useQueries) documentation
21
24
-`options.queries: QueryOptions[]`
22
25
-**Required** array of _Queries_ to be executed
23
-
-`parameters: { path, query, header }` will be used for the request
26
+
-`parameters: { path, query, header, body }` will be used for the request
27
+
- For operations generated with `--queryable-write-operations`, `body` is part of the query key and cache identity
24
28
-`queryKey: QueryKey` will be used for the request instead of the `parameters`
25
29
-`queryKey` and `parameters` are mutually exclusive
Copy file name to clipboardExpand all lines: website/docs/hooks/useSuspenseQueries.mdx
+29-1Lines changed: 29 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,8 @@ const result = api.<service>.<operation>.useSuspenseQueries(
23
23
-**Required**, represents the options for queries, see [_useSuspenseQueries(...) 🌴_](https://tanstack.com/query/latest/docs/framework/react/reference/useSuspenseQueries) documentation
24
24
-`options.queries: QueryOptions[]`
25
25
-**Required** array of _Queries_ to be executed
26
-
-`parameters: { path, query, header }` will be used for the request
26
+
-`parameters: { path, query, header, body }` will be used for the request
27
+
- For operations generated with `--queryable-write-operations`, `body` is part of the query key and cache identity
27
28
-`queryKey: QueryKey` will be used for the request instead of the `parameters`
28
29
-`queryKey` and `parameters` are mutually exclusive
-**Required only if OpenAPI specification defines required parameters**
25
25
- If the operation has no required parameters according to OpenAPI, you can omit this argument
26
26
-`parameters` will be used to generate the `QueryKey`
27
-
- Instead of an object with `{path, query, header}`, you can pass a `QueryKey` as an array
27
+
- For operations generated with `--queryable-write-operations`, query parameters may also include `body`
28
+
- In that mode, `body` is part of the query key and cache identity for query hooks and query-client methods
29
+
- Mutation calls keep `body` as a separate top-level argument
30
+
- Instead of an object with `{ path, query, header, body }`, you can pass a `QueryKey` as an array
28
31
which is also strictly-typed ✨
29
-
- If operation does not require parameters, you must pass an empty object `{}` for strictness
30
32
31
33
2.`queryOptions?: UseQueryOptions`
32
34
-**Optional**, represents the options of the [_useSuspenseQuery(...) 🌴_](https://tanstack.com/query/latest/docs/framework/react/reference/useSuspenseQuery) Hook
- **Required**, represents the [_Query Filters 🌴_](https://tanstack.com/query/latest/docs/framework/react/guides/filters#query-filters)
27
27
to be used, strictly-typed ✨
28
-
- `filters.parameters: { path, query, header }` will be used for filtering queries by parameters
28
+
- `filters.parameters: { path, query, header, body }` filters queries by operation parameters.
29
+
- For operations generated with `--queryable-write-operations`, `body` can be included in `filters.parameters` and participates in query cache identity.
29
30
- `filters.infinite?: boolean` will be used to filter infinite or normal queries, **Required** if `predicate` is provided
30
31
- `filters.queryKey?: QueryKey` will be used for filtering queries by _QueryKey_ instead of ~~`parameters`~~
31
32
- `filters.queryKey` and `filters.parameters` are mutually exclusive
- **Required**, represents the [_Query Filters 🌴_](https://tanstack.com/query/latest/docs/framework/react/guides/filters#query-filters)
47
48
to be used, strictly-typed ✨
48
-
- `filters.parameters: { path, query, header }` will be used for filtering queries by parameters
49
+
- `filters.parameters: { path, query, header, body }` filters queries by operation parameters.
50
+
- For operations generated with `--queryable-write-operations`, `body` can be included in `filters.parameters` and participates in query cache identity.
49
51
- `filters.infinite?: boolean` will be used to filter infinite or normal queries, **Required** if `predicate` is provided
50
52
- `filters.queryKey?: QueryKey` will be used for filtering queries by _QueryKey_ instead of ~~`parameters`~~
51
53
- `filters.queryKey` and `filters.parameters` are mutually exclusive
0 commit comments