naystack 1.4.6 → 1.4.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.
@@ -91,8 +91,9 @@ function useAuthMutation(mutation, options) {
91
91
  const token = (0, import_client2.useToken)();
92
92
  const [mutate, result] = (0, import_client.useMutation)(mutation, options);
93
93
  const method = (0, import_react.useCallback)(
94
- (variables) => mutate({
95
- variables,
94
+ (input) => mutate({
95
+ // @ts-ignore
96
+ variables: { input },
96
97
  context: tokenContext(token)
97
98
  }),
98
99
  [token]
@@ -13,6 +13,6 @@ declare const tokenContext: (token?: string | null) => {
13
13
  credentials: string;
14
14
  } | undefined;
15
15
  declare function useAuthQuery<T, V extends OperationVariables>(query: TypedDocumentNode<T, V>, variables?: V): readonly [(v?: V) => Promise<_apollo_client.QueryResult<T, V>>, _apollo_client.QueryResult<T, V>];
16
- declare function useAuthMutation<T, V extends OperationVariables>(mutation: TypedDocumentNode<T, V>, options?: MutationHookOptions<T, V>): readonly [(variables?: V) => Promise<_apollo_client.FetchResult<T>>, _apollo_client.MutationResult<T>];
16
+ declare function useAuthMutation<T, V extends OperationVariables>(mutation: TypedDocumentNode<T, V>, options?: MutationHookOptions<T, V>): readonly [(input: V["input"]) => Promise<_apollo_client.FetchResult<T>>, _apollo_client.MutationResult<T>];
17
17
 
18
18
  export { getApolloWrapper, tokenContext, useAuthMutation, useAuthQuery };
@@ -13,6 +13,6 @@ declare const tokenContext: (token?: string | null) => {
13
13
  credentials: string;
14
14
  } | undefined;
15
15
  declare function useAuthQuery<T, V extends OperationVariables>(query: TypedDocumentNode<T, V>, variables?: V): readonly [(v?: V) => Promise<_apollo_client.QueryResult<T, V>>, _apollo_client.QueryResult<T, V>];
16
- declare function useAuthMutation<T, V extends OperationVariables>(mutation: TypedDocumentNode<T, V>, options?: MutationHookOptions<T, V>): readonly [(variables?: V) => Promise<_apollo_client.FetchResult<T>>, _apollo_client.MutationResult<T>];
16
+ declare function useAuthMutation<T, V extends OperationVariables>(mutation: TypedDocumentNode<T, V>, options?: MutationHookOptions<T, V>): readonly [(input: V["input"]) => Promise<_apollo_client.FetchResult<T>>, _apollo_client.MutationResult<T>];
17
17
 
18
18
  export { getApolloWrapper, tokenContext, useAuthMutation, useAuthQuery };
@@ -67,8 +67,9 @@ function useAuthMutation(mutation, options) {
67
67
  const token = useToken();
68
68
  const [mutate, result] = useMutation(mutation, options);
69
69
  const method = useCallback(
70
- (variables) => mutate({
71
- variables,
70
+ (input) => mutate({
71
+ // @ts-ignore
72
+ variables: { input },
72
73
  context: tokenContext(token)
73
74
  }),
74
75
  [token]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "naystack",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "A stack built with Next + GraphQL + S3 + Auth",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",