Back to Content Management API
pageDelete
Deletes a page.
Arguments
- Name
id
- Type
- ID!
- Description
The ID of the page you want to delete.
Returns
- Name
DeletePayload.*
- Type
- DeletePayload
- Description
Any requested field from the DeletePayload object.
Request
import { PackClient } from '@pack/client'
const packClient = new PackClient({
token: 'YOUR-PACK-TOKEN'
});
const query = `
mutation PageDelete($id: ID!) {
pageDelete(id: $id) {
id
}
}
`;
const response = await packClient.fetch(query, { variables: { id: 'YOUR-PAGE-ID' } });
console.log(response.data);
Response
{
"pageDelete": {
"id": "0190e20e-e462-749f-9f64-d3894de9b139"
}
}