Update Display Name
Users can update the display name in their profiles. The handle will NOT be changed in this case.
import {
useUpdateProfileDisplayName,
} from '@futureverse/asset-register-react/profiles'
const Page = () => {
const { updateAsync } = useUpdateProfileDisplayName()
const updateProfileDisplayName = async () => {
const profile = await updateAsync({
displayName: 'John Doe',
owner: '<FUTUREPASS_ADDRESS>',
handle: 'john-doe-123'
})
console.log('profile', profile)
}
return (
<>
<button onClick={updateProfileDisplayName}>Update Profile Display Name</button>
</>
)
}
import { ProfilesClient } from '@futureverse/asset-register/profiles'
const pc = new ProfilesClient({
...
})
const updateProfileDisplayName = async () => {
const profile = await pc.updateProfileDisplayName({
displayName: 'John Doe',
owner: '<FUTUREPASS_ADDRESS>',
handle: 'john-doe-123'
})
return profile
}
updateProfileDisplayName()
Mutation
mutation UpdateProfileDisplayName($input: UpdateProfileDisplayNameInput!) {
updateProfileDisplayName(input: $input) {
profile {
displayName
handle
owner
}
}
}
Variables
{
"input": {
"displayName": "John Doe",
"owner": "<FUTUREPASS_ADDRESS>",
"handle": "john-doe-123"
}
}
Auth header
authorization: <FUTUREPASS_ID_TOKEN>
Last updated