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
Copy file name to clipboardExpand all lines: docs/openapi-ts/plugins/tanstack-query.md
+77-21Lines changed: 77 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,6 +133,39 @@ export default {
133
133
134
134
You can customize the naming and casing pattern for `queryOptions` functions using the `.name` and `.case` options.
135
135
136
+
### Meta
137
+
138
+
You can use the `meta` field to attach arbitrary information to a query. To generate metadata for `queryOptions`, provide a function to the `.meta` option.
Query keys contain normalized SDK function parameters and additional metadata.
@@ -300,6 +333,39 @@ export default {
300
333
301
334
You can customize the naming and casing pattern for `infiniteQueryOptions` functions using the `.name` and `.case` options.
302
335
336
+
### Meta
337
+
338
+
You can use the `meta` field to attach arbitrary information to a query. To generate metadata for `infiniteQueryOptions`, provide a function to the `.meta` option.
Infinite query keys contain normalized SDK function parameters and additional metadata.
@@ -472,28 +538,18 @@ export default {
472
538
473
539
You can customize the naming and casing pattern for `mutationOptions` functions using the `.name` and `.case` options.
474
540
475
-
:::
476
-
477
-
## Meta Function Customization
541
+
### Meta
478
542
479
-
The TanStack Query plugin supports custom meta functions that allow you to generate any metadata you want for your operations.
543
+
You can use the `meta` field to attach arbitrary information to a mutation. To generate metadata for `mutationOptions`, provide a function to the `.meta` option.
You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@tanstack/react-query/types.d.ts) interface.
0 commit comments