Back to Content Management API
templateDelete
Deletes a template.
Arguments
- Name
id
- Type
- ID!
- Description
The ID of the template 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 templateDelete($id: ID!) {
templateDelete(id: $id) {
id
}
}
`;
const variables = {
id: 'YOUR-TEMPLATE-ID'
};
const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);
Response
{
"data": {
"templateDelete": {
id: "YOUR-TEMPLATE-ID"
}
}
}