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