Skip to main content

playlistUpdate Mutation

Description

Updates an existing playlist. You can update the title, link, and entries. When updating entries, the entire entries array is replaced with the provided entries. Only the fields provided in the input are updated; other fields remain unchanged.

mutation playlistUpdate(
$playlistRef: ID!
$playlistUpdateInput: PlaylistUpdateInput
) {
playlistUpdate(
playlistRef: $playlistRef
playlistUpdateInput: $playlistUpdateInput
) {
_id
id
title
created
link
entries {
comments
}
}
}

Variables

{
"playlistRef": "6e2db39f430cf88dd9952ab8",
"playlistUpdateInput": {
"title": "title",
"link": "link",
"entries": [
{
"ref": "169e9d38a723d3b299ce9f58",
"comments": "comments"
}
]
}
}

Response

{
"playlistUpdate": {
"_id": "02a8951c866aa117ddda6c07",
"id": 8675546230167,
"title": "example",
"created": 1703590154883,
"link": "example",
"entries": [
{
"comments": "example"
}
]
}
}

Arguments

NameTypeDescription
playlistRefID!Reference ID of the playlist to update.
playlistUpdateInputPlaylistUpdateInputPlaylist update data including title, optional link, and entries to replace.

Returns

Playlist