Back to Content Management API
siteSettingsPublish
Publishes the site settings.
Arguments
- Name
id
- Type
- ID!
- Description
The ID of the site settings object you want to publish.
- Name
publishComment
- Type
- String
- Description
An optional string to comment on the site settings publish.
Returns
- Name
SiteSettings.*
- Type
- SiteSettings
- Description
Any requested field from the SiteSettings object.
Request
import { PackClient } from '@pack/client'
const packClient = new PackClient({
token: 'YOUR-PACK-TOKEN'
});
const query = `
mutation siteSettingsPublish($id: ID!) {
siteSettingsPublish(id: $id) {
id
title
description
logo {
url
}
favicon {
url
}
theme {
primaryColor
secondaryColor
backgroundColor
textColor
}
}
}
`;
const variables = {
id: 'YOUR-SITESETTINGS-ID'
};
const response = await packClient.fetch(query, { variables: variables });
console.log(response.data);
Response
{
"data": {
"siteSettingsPublish": {
"id": "YOUR-SITESETTINGS-ID",
"title": "Site Title",
"description": "Site Description",
"logo": {
"url": "https://example.com/logo.png"
},
"favicon": {
"url": "https://example.com/favicon.png"
},
"theme": {
"primaryColor": "#000000",
"secondaryColor": "#FFFFFF",
"backgroundColor": "#FFFFFF",
"textColor": "#000000"
}
}
}
}