Back to Content Management API
blogUnpublishBulk
Bulk unpublish blogs.
Arguments
- Name
ids
- Type
- [ID!]
- Description
Array of blog IDs that you want to unpublish.
Returns
- Name
Job
- Type
- Job
- Description
Any requested field from the Job object.
Request
import { PackClient } from '@pack/client'
const packClient = new PackClient({
token: 'YOUR-PACK-TOKEN'
});
const query = `
mutation BlogUnpublishBulk($ids: [ID!]!) {
blogUnpublishBulk(ids: $ids) {
id
}
}
`;
const variables = {
ids: ['blog-1', 'blog-2']
};
const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);
Response
{
"data": {
"blogUnpublishBulk": {
"id": "1"
}
}
}