Back to Content Management API

contentReleaseRebaseDraft

Re-pins a release draft to the current live version of its content, clearing the conflict for that item. Use it after reviewing the live changes and deciding the release draft should still win. The release must be open.

Arguments

  • Name
    releaseId
    Type
    ID!
    Description

    The ID of the release.

  • Name
    contentType
    Type
    ContentReleaseDraftType!
    Description

    The type of content the draft belongs to: page, article, blog, product, collection, siteSettings, section, or template.

  • Name
    contentId
    Type
    ID!
    Description

    The ID of the content item.

Returns

  • Name
    Boolean!
    Type
    Boolean!
    Description

    Returns true when the draft is rebased.

Request

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

const query = `
  mutation ContentReleaseRebaseDraft($releaseId: ID!, $contentType: ContentReleaseDraftType!, $contentId: ID!) {
    contentReleaseRebaseDraft(releaseId: $releaseId, contentType: $contentType, contentId: $contentId)
  }
`
const variables = {
  releaseId: 'release-id',
  contentType: 'section',
  contentId: 'section-id',
}
const response = await packClient.fetch(query, { variables })
console.log(response.data)

Response

{
  "data": {
    "contentReleaseRebaseDraft": true
  }
}

Was this page helpful?