Skip to content

sections ​

The published sections of the current channel's active theme, in render order, as a cursor-paginated connection.

Arguments ​

ArgumentTypeDescription
typeStringExact match on the section type.
firstIntItems to take from the start.
afterStringCursor to continue from.
lastIntItems to take from the end.
beforeStringCursor to end at.

Node fields ​

FieldTypeDescription
idID!Resource IRI.
_idInt!Section ID.
themeCodeStringTheme the section belongs to.
channelIdIntChannel the section belongs to.
typeStringOne of the six section types.
nameStringSection name.
sortOrderIntPosition in the page.
statusStringAlways "1" — only published sections are returned.
createdAtStringISO 8601.
updatedAtStringISO 8601.
translationobjectContent for the current locale.
translationsarrayEvery locale the section has content for.

Each translation carries id, _id, sectionId, locale and options.

Use cases ​

  • Render a home page in one round trip — take the connection without type and switch on each node's type to pick a component.
  • Fetch only the footer — sections(type: "footer_links", first: 1).

Best practices ​

  • options is a JSON-encoded string. Parse it client-side; it is not a typed object, because its shape changes per section type.
  • status comes back as a string. It is always "1" here, since unpublished sections are not part of the storefront surface — do not filter on it.
  • Draw the nodes in the order returned. The connection is already in render order.

Permissions ​

Public. Requires only the storefront key.

Released under the MIT License.