Back to Content Management API
templateUnpublishBulk
Bulk-unpublishes templates.
Arguments
- Name
ids
- Type
- [ID!]
- Description
Array of template 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 templateUnpublishBulk($ids: [ID!]!) {
templateUnpublishBulk(ids: $ids) {
id
}
}
`;
const variables = {
ids: ['TEMPLATE_ID']
};
const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);
Response
{
"data": {
"templateUnpublishBulk": {
"id": "1"
}
}
}