@go-avro/avro-js 0.0.69 → 0.0.70

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.
@@ -90,6 +90,24 @@ AvroQueryClient.prototype.useCreateRoute = function () {
90
90
  queryClient.setQueryData(['routes'], context.previousRoutes);
91
91
  }
92
92
  },
93
+ onSettled: () => {
94
+ queryClient.setQueriesData({ queryKey: ['routes'] }, (oldData) => {
95
+ if (!oldData)
96
+ return oldData;
97
+ if (oldData.pages) {
98
+ return {
99
+ ...oldData,
100
+ pages: oldData.pages
101
+ .map((page) => page.filter((r) => r.id !== 'temp-id'))
102
+ .filter((page) => page.length > 0),
103
+ };
104
+ }
105
+ if (Array.isArray(oldData)) {
106
+ return oldData.filter((r) => r.id !== 'temp-id');
107
+ }
108
+ return oldData;
109
+ });
110
+ },
93
111
  });
94
112
  };
95
113
  AvroQueryClient.prototype.useScheduleRoutes = function () {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const AVRO_JS_VERSION = "0.0.69";
1
+ export declare const AVRO_JS_VERSION = "0.0.70";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // AUTO-GENERATED by scripts/gen-version.js — do not edit by hand.
2
2
  // Regenerated from package.json by the `prebuild` npm hook.
3
- export const AVRO_JS_VERSION = '0.0.69';
3
+ export const AVRO_JS_VERSION = '0.0.70';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@go-avro/avro-js",
3
- "version": "0.0.69",
3
+ "version": "0.0.70",
4
4
  "description": "JS client for Avro backend integration.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",