Back to Content Management API
pageUnpublish
Unpublishes page.
Arguments
- Name
id
- Type
- ID!
- Description
The ID of the page you want to unpublish.
Returns
- Name
Page.*
- Type
- Page
- Description
Any requested field from the page object.
Request
import { PackClient } from '@pack/client'
const packClient = new PackClient({
token: 'YOUR-PACK-TOKEN'
});
const query = `
mutation PageUnpublish($id: ID!) {
pageUnpublish(id: $id) {
id
}
}
`
const response = await packClient.fetch(query, { variables: { id: 'your-page-id' } });
console.log(response.data);
Response
{
"data": {
"PageUnpublish": {
"id": "your-page-id"
}
}
}