Select Profile
You can use the SelectProfile API to record the last used handle of a particular experience.
import {
useSelectProfile,
} from '@futureverse/asset-register-react/profiles'
const Page = () => {
const { selectAsync } = useSelectProfile()
const onClick = async () => {
const result = await selectAsync({
experience: 'TTK',
handle: 'john-doe-123',
owner: '<FUTUREPASS_ADDRESS>',
})
console.log('result', result)
}
return (
<>
<button onClick={onClick}>Submit</button>
</>
)
}
import { ProfilesClient } from '@futureverse/asset-register/profiles'
const pc = new ProfilesClient({
...
})
const selectProfile = async () => {
const result = await ar.selectProfile({
experience: 'TTK',
handle: 'john-doe-123',
owner: '<FUTUREPASS_ADDRESS>',
})
return result
}
setProfileAvatar()
Mutation
mutation SelectProfile($input: SelectProfileInput!) {
selectProfile(input: $input) {
profileExperience {
owner
handle
experience
}
}
}
Variables
{
"input": {
"experience": "TTK",
"handle": "john-doe-123"
"owner": "<FUTUREPASS_ADDRESS>",
}
}
Auth header
authorization: <FUTUREPASS_ID_TOKEN>
Last updated