Back to Content Management API
blogDelete
Deletes a blog.
Arguments
- Name
id
- Type
- ID!
- Description
The ID of the blog 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 BlogDelete($id: ID!) {
blogDelete(id: $id) {
... on DeletePayload {
success
}
}
}
`;
const variables = {
"id": "60f4b3b3b3b3b3b3b3b3b3b"
};
const response = await packClient.fetch(query, { variables });
console.log(response.data);
Response
{
"data": {
"blogDelete": {
"success": true
}
}
}