zudoku 0.23.6 → 0.23.8
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/dist/lib/plugins/openapi/Route.js +0 -3
- package/dist/lib/plugins/openapi/Route.js.map +1 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js +10 -1
- package/dist/lib/plugins/openapi/client/useCreateQuery.js.map +1 -1
- package/dist/lib/plugins/openapi/context.d.ts +1 -1
- package/dist/lib/plugins/openapi/interfaces.d.ts +1 -1
- package/dist/vite/plugin-api.js +5 -1
- package/dist/vite/plugin-api.js.map +1 -1
- package/dist/vite/plugin-theme-css.js +53 -1
- package/dist/vite/plugin-theme-css.js.map +1 -1
- package/lib/{OperationList-n4U_BHmO.js → OperationList-Cdbaz-V3.js} +3 -3
- package/lib/OperationList-Cdbaz-V3.js.map +1 -0
- package/lib/{Route-C8nwd9A2.js → Route-Ag5MH86N.js} +7 -9
- package/lib/Route-Ag5MH86N.js.map +1 -0
- package/lib/context-h_UkBLvr.js.map +1 -1
- package/lib/{index-DStSNvP-.js → index-Bfm--TJU.js} +3 -3
- package/lib/{index-DStSNvP-.js.map → index-Bfm--TJU.js.map} +1 -1
- package/lib/zudoku.plugin-openapi.js +1 -1
- package/package.json +1 -1
- package/src/lib/plugins/openapi/Route.tsx +0 -4
- package/src/lib/plugins/openapi/client/useCreateQuery.ts +13 -1
- package/src/lib/plugins/openapi/context.tsx +1 -1
- package/src/lib/plugins/openapi/interfaces.ts +1 -1
- package/lib/OperationList-n4U_BHmO.js.map +0 -1
- package/lib/Route-C8nwd9A2.js.map +0 -1
package/package.json
CHANGED
|
@@ -12,7 +12,19 @@ export const useCreateQuery = <TResult, TVariables>(
|
|
|
12
12
|
throw new Error("useGraphQL must be used within a GraphQLProvider");
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
const hash = useMemo(() =>
|
|
15
|
+
const hash = useMemo(() => {
|
|
16
|
+
if (
|
|
17
|
+
typeof variables[0] === "object" &&
|
|
18
|
+
variables[0] != null &&
|
|
19
|
+
"input" in variables[0] &&
|
|
20
|
+
typeof variables[0].input === "function"
|
|
21
|
+
) {
|
|
22
|
+
// This is a pre-hashed name to ensure that the query key is consistent across server and client
|
|
23
|
+
return variables[0].input.name;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
return hashit(variables[0] ?? {});
|
|
27
|
+
}, [variables]);
|
|
16
28
|
|
|
17
29
|
return {
|
|
18
30
|
queryFn: () => graphQLClient.fetch(query, ...variables),
|