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>',
profileId: 'f9da67a9-db13-49e2-927d-0920110eb4a4'
})
console.log('profile', profile)
}
return (
<>
<button onClick={updateProfileDisplayName}>Update Profile Display Name</button>
</>
)
}
import { ProfilesClient } from '@futureverse/asset-register/profiles'
import { ProfileModel } from '@futureverse/asset-register';
const pc = new ProfilesClient({
...
})
const updateProfileDisplayName = async () => {
const results = await pc.updateProfileDisplayName({
displayName: 'John Doe',
owner: '<FUTUREPASS_ADDRESS>',
profileId: 'f9da67a9-db13-49e2-927d-0920110eb4a4'
}).execute()
const profile = results[0] as ProfileModel
return profile
}
updateProfileDisplayName()
Mutation
mutation UpdateProfileDisplayName($input: UpdateProfileDisplayNameInput!) {
updateProfileDisplayName(input: $input) {
profile {
displayName
profileId
owner
}
}
}
Variables
{
"input": {
"displayName": "John Doe",
"owner": "<FUTUREPASS_ADDRESS>",
"profileId": "f9da67a9-db13-49e2-927d-0920110eb4a4"
}
}
Auth header
authorization: <FUTUREPASS_ACCESS_TOKEN>
Last updated