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

    The id of the deleted item.

Request

import { PackClient } from '@pack/client'
const packClient = new PackClient({
  token: 'YOUR-PACK-TOKEN'
});

const query = `
  mutation BlogDelete($id: ID!) {
    blogDelete(id: $id) {
      id
    }
  }
`;
const variables = {
  "id": "60f4b3b3b3b3b3b3b3b3b3b"
};
const response = await packClient.fetch(query, { variables });
console.log(response.data);

Response

{
    "data": {
        "blogDelete": {
            "id": "60f4b3b3b3b3b3b3b3b3b3b"
        }
    }
}

Was this page helpful?