@zeroin.earth/appwrite-graphql 0.14.3 → 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 CHANGED
@@ -5862,11 +5862,11 @@ declare function useUpdateDocument<TDocument>(): {
5862
5862
 
5863
5863
  type Props = {
5864
5864
  functionId: string;
5865
- body: Record<string, any>;
5866
- async: boolean;
5867
- path: string;
5868
- method: string;
5869
- headers: Record<string, any>;
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, any>;
5866
- async: boolean;
5867
- path: string;
5868
- method: string;
5869
- headers: Record<string, any>;
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
@@ -2094,7 +2094,14 @@ function useFunction() {
2094
2094
  const [currentExecution, setCurrentExecution] = (0, import_react5.useState)(null);
2095
2095
  const [currentFunction, setCurrentFunction] = (0, import_react5.useState)(null);
2096
2096
  const executeFunction = useMutation({
2097
- mutationFn: async ({ functionId, body = {}, async, path, method, headers }) => {
2097
+ mutationFn: async ({
2098
+ functionId,
2099
+ body = {},
2100
+ async = false,
2101
+ path = "/",
2102
+ method = "POST",
2103
+ headers = {}
2104
+ }) => {
2098
2105
  setCurrentFunction(functionId);
2099
2106
  const { data } = await graphql2.mutation({
2100
2107
  query: createExecution,