import { gql } from '@apollo/client';

export const UPDATE_USER = gql`
  mutation UpdateUser($data: UserUpdateInput!, $where: UserWhereUniqueInput!) {
    updateUser(data: $data, where: $where) {
      id
      email
      displayName
      firstName
      lastName
      avatarUrl
    }
  }
`;

export const UPDATE_PROFILE_PICTURE = gql`
  mutation UploadProfilePicture($file: Upload!) {
    uploadProfilePicture(file: $file)
  }
`;

export const REMOVE_PROFILE_PICTURE = gql`
  mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
    updateUser(data: { avatarUrl: { set: null } }, where: $where) {
      id
    }
  }
`;
