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