@zeroin.earth/appwrite-graphql 0.14.2 → 0.14.4
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/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +10 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5862,11 +5862,11 @@ declare function useUpdateDocument<TDocument>(): {
|
|
|
5862
5862
|
|
|
5863
5863
|
type Props = {
|
|
5864
5864
|
functionId: string;
|
|
5865
|
-
body?: Record<string,
|
|
5866
|
-
async?: boolean
|
|
5867
|
-
path?: string
|
|
5868
|
-
method?: string
|
|
5869
|
-
headers?:
|
|
5865
|
+
body?: Record<string, any>;
|
|
5866
|
+
async?: boolean;
|
|
5867
|
+
path?: string;
|
|
5868
|
+
method?: string;
|
|
5869
|
+
headers?: Record<string, any>;
|
|
5870
5870
|
};
|
|
5871
5871
|
declare function useFunction(): {
|
|
5872
5872
|
executeFunction: _tanstack_react_query.UseMutationResult<Record<string, unknown>, Error, Props, unknown>;
|
package/dist/index.d.ts
CHANGED
|
@@ -5862,11 +5862,11 @@ declare function useUpdateDocument<TDocument>(): {
|
|
|
5862
5862
|
|
|
5863
5863
|
type Props = {
|
|
5864
5864
|
functionId: string;
|
|
5865
|
-
body?: Record<string,
|
|
5866
|
-
async?: boolean
|
|
5867
|
-
path?: string
|
|
5868
|
-
method?: string
|
|
5869
|
-
headers?:
|
|
5865
|
+
body?: Record<string, any>;
|
|
5866
|
+
async?: boolean;
|
|
5867
|
+
path?: string;
|
|
5868
|
+
method?: string;
|
|
5869
|
+
headers?: Record<string, any>;
|
|
5870
5870
|
};
|
|
5871
5871
|
declare function useFunction(): {
|
|
5872
5872
|
executeFunction: _tanstack_react_query.UseMutationResult<Record<string, unknown>, Error, Props, unknown>;
|
package/dist/index.js
CHANGED
|
@@ -429,6 +429,7 @@ function useCreateJWT({ gcTime = 6e5 } = {}) {
|
|
|
429
429
|
return data.accountCreateJWT;
|
|
430
430
|
},
|
|
431
431
|
onSuccess: (data) => {
|
|
432
|
+
graphql2.client.setJWT(data.jwt);
|
|
432
433
|
queryClient2.setQueryData(["appwrite", "jwt"], data.jwt, { updatedAt: Date.now() });
|
|
433
434
|
}
|
|
434
435
|
});
|
|
@@ -446,6 +447,7 @@ function useSuspenseCreateJWT({ gcTime = 6e5 } = {}) {
|
|
|
446
447
|
if (errors) {
|
|
447
448
|
throw errors;
|
|
448
449
|
}
|
|
450
|
+
graphql2.client.setJWT(data.accountCreateJWT.jwt);
|
|
449
451
|
return data.accountCreateJWT;
|
|
450
452
|
}
|
|
451
453
|
});
|
|
@@ -2092,7 +2094,14 @@ function useFunction() {
|
|
|
2092
2094
|
const [currentExecution, setCurrentExecution] = (0, import_react5.useState)(null);
|
|
2093
2095
|
const [currentFunction, setCurrentFunction] = (0, import_react5.useState)(null);
|
|
2094
2096
|
const executeFunction = useMutation({
|
|
2095
|
-
mutationFn: async ({
|
|
2097
|
+
mutationFn: async ({
|
|
2098
|
+
functionId,
|
|
2099
|
+
body = {},
|
|
2100
|
+
async = false,
|
|
2101
|
+
path = "/",
|
|
2102
|
+
method = "POST",
|
|
2103
|
+
headers = {}
|
|
2104
|
+
}) => {
|
|
2096
2105
|
setCurrentFunction(functionId);
|
|
2097
2106
|
const { data } = await graphql2.mutation({
|
|
2098
2107
|
query: createExecution,
|