Change the owner of a story
Make another user the owner of a story with the storyChangeOwner mutation.
You need the GraphQL ID of the story (see Get a story) and the GraphQL ID of the new owner.
The mutation:
mutation changeOwner($input: StoryChangeOwnerInput!) {
storyChangeOwner(input: $input) {
story {
id
user {
id
name
}
}
errors {
__typename
... on MutationError {
path
}
}
}
}
The variables:
{
"input": {
"id": "STORY_ID",
"owner": "OWNER_ID"
}
}
The response confirms the new owner:
{
"data": {
"storyChangeOwner": {
"story": {
"id": "STORY_ID",
"user": {
"id": "OWNER_ID",
"name": "Jane Doe"
}
},
"errors": null
}
}
}