Add ability to remove profile picture on Profile Settings (#538)
* Add ability to remove profile picture on Profile Settings * Fix lint * Fix according to review
This commit is contained in:
@ -3037,13 +3037,6 @@ export type SearchCompanyQueryVariables = Exact<{
|
||||
|
||||
export type SearchCompanyQuery = { __typename?: 'Query', searchResults: Array<{ __typename?: 'Company', id: string, name: string, domainName: string }> };
|
||||
|
||||
export type UploadProfilePictureMutationVariables = Exact<{
|
||||
file: Scalars['Upload'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProfilePicture: string };
|
||||
|
||||
export type GetCurrentUserQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -3062,6 +3055,20 @@ export type UpdateUserMutationVariables = Exact<{
|
||||
|
||||
export type UpdateUserMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string, email: string, displayName: string, firstName?: string | null, lastName?: string | null, avatarUrl?: string | null } };
|
||||
|
||||
export type UploadProfilePictureMutationVariables = Exact<{
|
||||
file: Scalars['Upload'];
|
||||
}>;
|
||||
|
||||
|
||||
export type UploadProfilePictureMutation = { __typename?: 'Mutation', uploadProfilePicture: string };
|
||||
|
||||
export type RemoveProfilePictureMutationVariables = Exact<{
|
||||
where: UserWhereUniqueInput;
|
||||
}>;
|
||||
|
||||
|
||||
export type RemoveProfilePictureMutation = { __typename?: 'Mutation', updateUser: { __typename?: 'User', id: string } };
|
||||
|
||||
export type GetCurrentWorkspaceQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
@ -4358,37 +4365,6 @@ export function useSearchCompanyLazyQuery(baseOptions?: Apollo.LazyQueryHookOpti
|
||||
export type SearchCompanyQueryHookResult = ReturnType<typeof useSearchCompanyQuery>;
|
||||
export type SearchCompanyLazyQueryHookResult = ReturnType<typeof useSearchCompanyLazyQuery>;
|
||||
export type SearchCompanyQueryResult = Apollo.QueryResult<SearchCompanyQuery, SearchCompanyQueryVariables>;
|
||||
export const UploadProfilePictureDocument = gql`
|
||||
mutation UploadProfilePicture($file: Upload!) {
|
||||
uploadProfilePicture(file: $file)
|
||||
}
|
||||
`;
|
||||
export type UploadProfilePictureMutationFn = Apollo.MutationFunction<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>;
|
||||
|
||||
/**
|
||||
* __useUploadProfilePictureMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useUploadProfilePictureMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useUploadProfilePictureMutation` 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 [uploadProfilePictureMutation, { data, loading, error }] = useUploadProfilePictureMutation({
|
||||
* variables: {
|
||||
* file: // value for 'file'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useUploadProfilePictureMutation(baseOptions?: Apollo.MutationHookOptions<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>(UploadProfilePictureDocument, options);
|
||||
}
|
||||
export type UploadProfilePictureMutationHookResult = ReturnType<typeof useUploadProfilePictureMutation>;
|
||||
export type UploadProfilePictureMutationResult = Apollo.MutationResult<UploadProfilePictureMutation>;
|
||||
export type UploadProfilePictureMutationOptions = Apollo.BaseMutationOptions<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>;
|
||||
export const GetCurrentUserDocument = gql`
|
||||
query GetCurrentUser {
|
||||
currentUser {
|
||||
@ -4514,6 +4490,70 @@ export function useUpdateUserMutation(baseOptions?: Apollo.MutationHookOptions<U
|
||||
export type UpdateUserMutationHookResult = ReturnType<typeof useUpdateUserMutation>;
|
||||
export type UpdateUserMutationResult = Apollo.MutationResult<UpdateUserMutation>;
|
||||
export type UpdateUserMutationOptions = Apollo.BaseMutationOptions<UpdateUserMutation, UpdateUserMutationVariables>;
|
||||
export const UploadProfilePictureDocument = gql`
|
||||
mutation UploadProfilePicture($file: Upload!) {
|
||||
uploadProfilePicture(file: $file)
|
||||
}
|
||||
`;
|
||||
export type UploadProfilePictureMutationFn = Apollo.MutationFunction<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>;
|
||||
|
||||
/**
|
||||
* __useUploadProfilePictureMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useUploadProfilePictureMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useUploadProfilePictureMutation` 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 [uploadProfilePictureMutation, { data, loading, error }] = useUploadProfilePictureMutation({
|
||||
* variables: {
|
||||
* file: // value for 'file'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useUploadProfilePictureMutation(baseOptions?: Apollo.MutationHookOptions<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>(UploadProfilePictureDocument, options);
|
||||
}
|
||||
export type UploadProfilePictureMutationHookResult = ReturnType<typeof useUploadProfilePictureMutation>;
|
||||
export type UploadProfilePictureMutationResult = Apollo.MutationResult<UploadProfilePictureMutation>;
|
||||
export type UploadProfilePictureMutationOptions = Apollo.BaseMutationOptions<UploadProfilePictureMutation, UploadProfilePictureMutationVariables>;
|
||||
export const RemoveProfilePictureDocument = gql`
|
||||
mutation RemoveProfilePicture($where: UserWhereUniqueInput!) {
|
||||
updateUser(data: {avatarUrl: {set: null}}, where: $where) {
|
||||
id
|
||||
}
|
||||
}
|
||||
`;
|
||||
export type RemoveProfilePictureMutationFn = Apollo.MutationFunction<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>;
|
||||
|
||||
/**
|
||||
* __useRemoveProfilePictureMutation__
|
||||
*
|
||||
* To run a mutation, you first call `useRemoveProfilePictureMutation` within a React component and pass it any options that fit your needs.
|
||||
* When your component renders, `useRemoveProfilePictureMutation` 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 [removeProfilePictureMutation, { data, loading, error }] = useRemoveProfilePictureMutation({
|
||||
* variables: {
|
||||
* where: // value for 'where'
|
||||
* },
|
||||
* });
|
||||
*/
|
||||
export function useRemoveProfilePictureMutation(baseOptions?: Apollo.MutationHookOptions<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>) {
|
||||
const options = {...defaultOptions, ...baseOptions}
|
||||
return Apollo.useMutation<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>(RemoveProfilePictureDocument, options);
|
||||
}
|
||||
export type RemoveProfilePictureMutationHookResult = ReturnType<typeof useRemoveProfilePictureMutation>;
|
||||
export type RemoveProfilePictureMutationResult = Apollo.MutationResult<RemoveProfilePictureMutation>;
|
||||
export type RemoveProfilePictureMutationOptions = Apollo.BaseMutationOptions<RemoveProfilePictureMutation, RemoveProfilePictureMutationVariables>;
|
||||
export const GetCurrentWorkspaceDocument = gql`
|
||||
query GetCurrentWorkspace {
|
||||
currentWorkspace {
|
||||
|
||||
Reference in New Issue
Block a user