adminAppearanceSections
The sections a channel holds for a theme, in the order they are drawn, with footer_links last. Returns a plain list — one channel's page layout is not paginated.
Arguments
| Argument | Type | Description |
|---|---|---|
code | String! | Theme code. |
channel | Int | Channel ID. Falls back to the current channel. |
locale | String | Locale the options are read in. Must be one the channel runs; otherwise the app locale, then the channel's first locale. |
Fields
| Field | Type | Description |
|---|---|---|
id | ID! | Resource IRI. |
_id | Int! | Section ID. |
name | String | Name shown in the editor. |
type | String | One of the six section types. |
themeCode | String | Theme the section belongs to. |
channelId | Int | Channel the section belongs to. |
sortOrder | Int | Published position. |
status | Int | Published on/off — 1 or 0. |
draftStatus | Boolean | Staged on/off, null when nothing is staged. |
draftSortOrder | Int | Staged position, null when nothing is staged. |
hasDraft | String | "1" when the section holds any staged edit, else "0". |
isPinned | String | "1" for footer_links, which is always drawn last. |
createdAt | String | ISO 8601. |
updatedAt | String | ISO 8601. |
message | String | Action confirmation; null on reads. |
translations | connection | One node per locale that has content, each with locale, options and draftOptions. |
Use cases
- Draw the editor list — the list is already in render order, so render it as returned rather than sorting by
sortOrder, which would misplace a staged reorder and lift the footer. - Show an unpublished-changes banner — true when any node's
hasDraftis"1".
Best practices
hasDraftandisPinnedresolve as the strings"1"and"0". Compare against those, not againsttrue.optionsanddraftOptionsare JSON values and take no sub-selection — their shape changes per section type.- Ask for a channel explicitly. Without
channelthe current channel answers, which is rarely what a multi-channel editor wants.
Permissions
Requires appearance.sections.

