Back to Content Management API

articleDelete

Deletes an article.

Arguments

  • Name
    id
    Type
    ID!
    Description

    The ID of the article you want to delete.

Returns

Request

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

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

Response

{
  "data": {
    "articleDelete": {
      "success": true
    }
  }
}

Was this page helpful?