Core
Hooks
useUpdateProfile

useUpdateProfile

This hook allows you to update the de[id] of the currently signed in user.

Usage

import { useUpdateProfile } from '@dustlabs/profiles/core'
 
const { updateProfile, loading } = useUpdateProfile();

Return Value

This hook returns a generic GraphQL mutation function with an updateProfile mutation function.

updateProfile

(profileInput: ProfileInput) => Promise<FetchResult<ProfileData<"updateProfile">>>

This function takes in a ProfileInput object and returns a Promise that resolves to a FetchResult object containing the updated profile.

interface ProfileInput {
  description?: string | null;
  discordUsername?: string | null;
  discordId?: string | null;
  email?: string | null;
  location?: string | null;
  name?: string | null;
  profileImageBlob?: string | null;
  twitterHandle?: string | null;
  twitterId?: string | null;
  website?: string | null;
  mobile?: string | null;
}

These fields correspond to the fields on the Profile object.