Back to Content Management API
pageRevision
Returns a page's revision.
Arguments
- Name
id
- Type
- ID!
- Description
The ID of the page.
- Name
revisionId
- Type
- ID!
- Description
The ID of the revision.
Returns
- Name
PageRevision.*
- Type
- PageRevision
- Description
Any requested field from the PageRevision object.
Request
import { PackClient } from '@pack/client'
const packClient = new PackClient({
token: 'YOUR-PACK-TOKEN'
});
const query = `
query PageRevision($id: ID!, $revisionId: ID!) {
pageRevision(id: $id, revisionId: $revisionId) {
title
handle
description
}
}
`;
const response = await packClient.fetch(query, { variables: { id: '0190e0f1-56ce-7057-b325-31ab648e58cb', revisionId: '0190e0f1-56d3-70d2-979c-a03de3334005' } });
console.log(response.data);
Response
{
"data": {
"pageRevision": {
"title": "Testing Page",
"handle": "testing-page",
"description": "Testing."
}
}
}