@aws/nx-plugin-mcp 1.3.8 → 1.3.9
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.
|
@@ -408,6 +408,8 @@ function ItemList() {
|
|
|
408
408
|
|
|
409
409
|
The generated hooks automatically handle cursor-based pagination if your API supports it. The `nextCursor` value is extracted from the response and used to fetch the next page.
|
|
410
410
|
|
|
411
|
+
An infinite query is cached under its own query key, `[...api.listItems.queryKey(input), 'pages']`, so it never shares a cache entry with the plain query from `api.listItems.queryOptions(input)`. Invalidating `api.listItems.queryKey(input)` refreshes both, because TanStack Query matches query keys by prefix. To read or write the cached pages with `queryClient.getQueryData` or `setQueryData`, pass the infinite query's own key.
|
|
412
|
+
|
|
411
413
|
:::tip[Paginated APIs]
|
|
412
414
|
If you have a paginated API which has its pagination parameter named something other than `cursor`, you can [customise it using the `x-cursor` OpenAPI vendor extension](#custom-pagination-cursor).
|
|
413
415
|
:::
|
|
@@ -373,6 +373,8 @@ function ItemList() {
|
|
|
373
373
|
|
|
374
374
|
The generated hooks automatically handle cursor-based pagination if your API supports it. The `nextCursor` value is extracted from the response and used to fetch the next page.
|
|
375
375
|
|
|
376
|
+
An infinite query is cached under its own query key, `[...api.listItems.queryKey(input), 'pages']`, so it never shares a cache entry with the plain query from `api.listItems.queryOptions(input)`. Invalidating `api.listItems.queryKey(input)` refreshes both, because TanStack Query matches query keys by prefix. To read or write the cached pages with `queryClient.getQueryData` or `setQueryData`, pass the infinite query's own key.
|
|
377
|
+
|
|
376
378
|
:::tip[Paginated APIs]
|
|
377
379
|
If you have a paginated API which has its pagination parameter named something other than `cursor`, you can [customise it using the `x-cursor` OpenAPI vendor extension](#custom-pagination-cursor).
|
|
378
380
|
:::
|