Back to Content Management API
productPageRevision
Returns a product page's revision.
Arguments
- Name
id
- Type
- ID!
- Description
The ID of the product page.
- Name
revisionId
- Type
- ID!
- Description
The ID of the revision.
Returns
- Name
ProductPageRevision.*
- Type
- ProductPageRevision
- Description
Any requested field from the ProductPageRevision object.
Request
import { PackClient } from '@pack/client'
const packClient = new PackClient({
token: 'YOUR-PACK-TOKEN'
});
const query = `
query ProductPageRevision($id: ID!, $revisionId: ID!) {
productPageRevision(id: $id, revisionId: $revisionId) {
title
handle
description
}
}
`
const variables = {
id: 'product-page-id',
revisionId: 'revision-id'
}
const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);
Response
{
"data": {
"productPageRevision": {
"title": "Product Title",
"handle": "product-handle",
"description": "Product Description"
}
}
}