Admin API/Online store/Mutations
themeTemplateUpsert
mutationOstorya extensionSaves one page template (sections, blocks, settings), checked against the theme's schema.
Returns ThemeTemplateUpsertPayload!
mutation ThemeTemplateUpsert($data: JSON!, $template: String!, $themeId: ID!) {
themeTemplateUpsert(data: $data, template: $template, themeId: $themeId) {
theme {
id
name
previewUrl
publishedAt
role
settingsData
}
userErrors {
code
message
field
}
}
}
# Variables
{
"data": "",
"template": "",
"themeId": "gid://ostorya/Theme/0f8c5b1e-…"
}Arguments
Payload
- themeOnlineStoreTheme
- userErrors[UserError!]!required