Back to Content Management API
contentReleaseUpdate
Updates the name or description of a content release.
Arguments
- Name
id- Type
- ID!
- Description
The ID of the release you want to update.
- Name
input- Type
- ContentReleaseUpdateInput!
- Description
An object.
name:Stringdescription:String
Returns
- Name
ContentRelease.*- Type
- ContentRelease!
- Description
Any requested field from the ContentRelease object.
Request
import { PackClient } from '@pack/client'
const packClient = new PackClient({
token: 'YOUR-PACK-TOKEN',
})
const query = `
mutation ContentReleaseUpdate($id: ID!, $input: ContentReleaseUpdateInput!) {
contentReleaseUpdate(id: $id, input: $input) {
id
name
description
}
}
`
const variables = {
id: 'release-id',
input: {
description: 'Holiday homepage refresh',
},
}
const response = await packClient.fetch(query, { variables })
console.log(response.data)
Response
{
"data": {
"contentReleaseUpdate": {
"id": "release-id",
"name": "Holiday launch",
"description": "Holiday homepage refresh"
}
}
}