|
@@ -785,13 +785,13 @@ export type MutationCreateUserArgs = {
|
|
|
|
|
|
|
|
|
export type MutationUpdateUserArgs = {
|
|
|
- data: UserUpdateInput,
|
|
|
- where: UserWhereUniqueInput
|
|
|
+ email: Scalars['String'],
|
|
|
+ data: UserUpdateInput
|
|
|
};
|
|
|
|
|
|
|
|
|
export type MutationDeleteUserArgs = {
|
|
|
- where: UserWhereUniqueInput
|
|
|
+ email: Scalars['String']
|
|
|
};
|
|
|
|
|
|
|
|
@@ -859,7 +859,7 @@ export type Query = {
|
|
|
trainings: Array<Maybe<Training>>,
|
|
|
trainingTypes: Array<Maybe<TrainingType>>,
|
|
|
blocks: Array<Maybe<Block>>,
|
|
|
- me: User,
|
|
|
+ currentUser: User,
|
|
|
};
|
|
|
|
|
|
|
|
@@ -1923,11 +1923,6 @@ export type UserWhereInput = {
|
|
|
ratings_none?: Maybe<RatingWhereInput>,
|
|
|
};
|
|
|
|
|
|
-export type UserWhereUniqueInput = {
|
|
|
- id?: Maybe<Scalars['ID']>,
|
|
|
- email?: Maybe<Scalars['String']>,
|
|
|
-};
|
|
|
-
|
|
|
export type UsersQueryVariables = {};
|
|
|
|
|
|
|
|
@@ -1981,7 +1976,7 @@ export type CurrentUserQueryVariables = {};
|
|
|
|
|
|
export type CurrentUserQuery = (
|
|
|
{ __typename?: 'Query' }
|
|
|
- & { me: (
|
|
|
+ & { currentUser: (
|
|
|
{ __typename?: 'User' }
|
|
|
& Pick<User, 'id' | 'email' | 'name' | 'permissions' | 'interests'>
|
|
|
) }
|
|
@@ -2011,6 +2006,33 @@ export type ResetPasswordMutation = (
|
|
|
) }
|
|
|
);
|
|
|
|
|
|
+export type UserDeleteMutationVariables = {
|
|
|
+ email: Scalars['String']
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type UserDeleteMutation = (
|
|
|
+ { __typename?: 'Mutation' }
|
|
|
+ & { deleteUser: Maybe<(
|
|
|
+ { __typename?: 'User' }
|
|
|
+ & Pick<User, 'id'>
|
|
|
+ )> }
|
|
|
+);
|
|
|
+
|
|
|
+export type UserUpdateMutationVariables = {
|
|
|
+ email: Scalars['String'],
|
|
|
+ data: UserUpdateInput
|
|
|
+};
|
|
|
+
|
|
|
+
|
|
|
+export type UserUpdateMutation = (
|
|
|
+ { __typename?: 'Mutation' }
|
|
|
+ & { updateUser: Maybe<(
|
|
|
+ { __typename?: 'User' }
|
|
|
+ & Pick<User, 'id' | 'name' | 'email' | 'permissions' | 'interests'>
|
|
|
+ )> }
|
|
|
+);
|
|
|
+
|
|
|
|
|
|
export const UsersDocument = gql`
|
|
|
query Users {
|
|
@@ -2150,7 +2172,7 @@ export type UserLogoutMutationResult = ApolloReactCommon.MutationResult<UserLogo
|
|
|
export type UserLogoutMutationOptions = ApolloReactCommon.BaseMutationOptions<UserLogoutMutation, UserLogoutMutationVariables>;
|
|
|
export const CurrentUserDocument = gql`
|
|
|
query CurrentUser {
|
|
|
- me {
|
|
|
+ currentUser {
|
|
|
id
|
|
|
email
|
|
|
name
|
|
@@ -2247,4 +2269,73 @@ export function useResetPasswordMutation(baseOptions?: ApolloReactHooks.Mutation
|
|
|
}
|
|
|
export type ResetPasswordMutationHookResult = ReturnType<typeof useResetPasswordMutation>;
|
|
|
export type ResetPasswordMutationResult = ApolloReactCommon.MutationResult<ResetPasswordMutation>;
|
|
|
-export type ResetPasswordMutationOptions = ApolloReactCommon.BaseMutationOptions<ResetPasswordMutation, ResetPasswordMutationVariables>;
|
|
|
+export type ResetPasswordMutationOptions = ApolloReactCommon.BaseMutationOptions<ResetPasswordMutation, ResetPasswordMutationVariables>;
|
|
|
+export const UserDeleteDocument = gql`
|
|
|
+ mutation UserDelete($email: String!) {
|
|
|
+ deleteUser(email: $email) {
|
|
|
+ id
|
|
|
+ }
|
|
|
+}
|
|
|
+ `;
|
|
|
+export type UserDeleteMutationFn = ApolloReactCommon.MutationFunction<UserDeleteMutation, UserDeleteMutationVariables>;
|
|
|
+
|
|
|
+/**
|
|
|
+ * __useUserDeleteMutation__
|
|
|
+ *
|
|
|
+ * To run a mutation, you first call `useUserDeleteMutation` within a React component and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useUserDeleteMutation` returns a tuple that includes:
|
|
|
+ * - A mutate function that you can call at any time to execute the mutation
|
|
|
+ * - An object with fields that represent the current status of the mutation's execution
|
|
|
+ *
|
|
|
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
|
+ *
|
|
|
+ * @example
|
|
|
+ * const [userDeleteMutation, { data, loading, error }] = useUserDeleteMutation({
|
|
|
+ * variables: {
|
|
|
+ * email: // value for 'email'
|
|
|
+ * },
|
|
|
+ * });
|
|
|
+ */
|
|
|
+export function useUserDeleteMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<UserDeleteMutation, UserDeleteMutationVariables>) {
|
|
|
+ return ApolloReactHooks.useMutation<UserDeleteMutation, UserDeleteMutationVariables>(UserDeleteDocument, baseOptions);
|
|
|
+ }
|
|
|
+export type UserDeleteMutationHookResult = ReturnType<typeof useUserDeleteMutation>;
|
|
|
+export type UserDeleteMutationResult = ApolloReactCommon.MutationResult<UserDeleteMutation>;
|
|
|
+export type UserDeleteMutationOptions = ApolloReactCommon.BaseMutationOptions<UserDeleteMutation, UserDeleteMutationVariables>;
|
|
|
+export const UserUpdateDocument = gql`
|
|
|
+ mutation UserUpdate($email: String!, $data: UserUpdateInput!) {
|
|
|
+ updateUser(email: $email, data: $data) {
|
|
|
+ id
|
|
|
+ name
|
|
|
+ email
|
|
|
+ permissions
|
|
|
+ interests
|
|
|
+ }
|
|
|
+}
|
|
|
+ `;
|
|
|
+export type UserUpdateMutationFn = ApolloReactCommon.MutationFunction<UserUpdateMutation, UserUpdateMutationVariables>;
|
|
|
+
|
|
|
+/**
|
|
|
+ * __useUserUpdateMutation__
|
|
|
+ *
|
|
|
+ * To run a mutation, you first call `useUserUpdateMutation` within a React component and pass it any options that fit your needs.
|
|
|
+ * When your component renders, `useUserUpdateMutation` returns a tuple that includes:
|
|
|
+ * - A mutate function that you can call at any time to execute the mutation
|
|
|
+ * - An object with fields that represent the current status of the mutation's execution
|
|
|
+ *
|
|
|
+ * @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
|
+ *
|
|
|
+ * @example
|
|
|
+ * const [userUpdateMutation, { data, loading, error }] = useUserUpdateMutation({
|
|
|
+ * variables: {
|
|
|
+ * email: // value for 'email'
|
|
|
+ * data: // value for 'data'
|
|
|
+ * },
|
|
|
+ * });
|
|
|
+ */
|
|
|
+export function useUserUpdateMutation(baseOptions?: ApolloReactHooks.MutationHookOptions<UserUpdateMutation, UserUpdateMutationVariables>) {
|
|
|
+ return ApolloReactHooks.useMutation<UserUpdateMutation, UserUpdateMutationVariables>(UserUpdateDocument, baseOptions);
|
|
|
+ }
|
|
|
+export type UserUpdateMutationHookResult = ReturnType<typeof useUserUpdateMutation>;
|
|
|
+export type UserUpdateMutationResult = ApolloReactCommon.MutationResult<UserUpdateMutation>;
|
|
|
+export type UserUpdateMutationOptions = ApolloReactCommon.BaseMutationOptions<UserUpdateMutation, UserUpdateMutationVariables>;
|