Ostorya dev docs

Admin API/Online store/Mutations

themeTemplateUpsert

mutationOstorya extension

Saves 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

dataJSON!required
templateString!required
themeIdID!required

Payload

userErrors[UserError!]!required