@openapi-qraft/react 1.0.2 → 1.0.3

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
  # @openapi-qraft/react
2
2
 
3
+ ## 1.0.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 179fdaf: docs: Update README with `useQueries` hook
8
+
3
9
  ## 1.0.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -349,6 +349,45 @@ infiniteQuery.fetchNextPage();
349
349
  infiniteQuery.fetchPreviousPage();
350
350
  ```
351
351
 
352
+ ### [useQueries 🔗](https://tanstack.com/query/latest/docs/framework/react/reference/useQueries)
353
+
354
+ ```ts
355
+ /**
356
+ * Will execute the request two queries:
357
+ * ###
358
+ * GET /entities/3e3e-3e3e-3e3e
359
+ * x-monite-version: 2023-09-01
360
+ * ###
361
+ * GET /entities/5c5c-5c5c-5c5c
362
+ * x-monite-version: 2023-09-01
363
+ **/
364
+ qraft.entities.getEntities.useQueries({
365
+ queries: [
366
+ {
367
+ parameters: {
368
+ header: {
369
+ 'x-monite-version': '2023-09-01',
370
+ },
371
+ path: {
372
+ entity_id: '3e3e-3e3e-3e3e',
373
+ },
374
+ },
375
+ },
376
+ {
377
+ parameters: {
378
+ header: {
379
+ 'x-monite-version': '2023-09-01',
380
+ },
381
+ path: {
382
+ entity_id: '5c5c-5c5c-5c5c',
383
+ },
384
+ },
385
+ },
386
+ ],
387
+ combine: (results) => results.map((result) => result.data),
388
+ });
389
+ ```
390
+
352
391
  ### Suspense Queries
353
392
 
354
393
  Supported Suspense Queries are:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openapi-qraft/react",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "API client for React, providing type-safe requests and dynamic Tanstack Query React Hooks via a modular, Proxy-based architecture.",
5
5
  "scripts": {
6
6
  "build": "rimraf dist/ && tsc --project tsconfig.build.json",