Skip to content

Get Channel

About

The channel query retrieves detailed information about a single channel by its ID. Use this query to:

  • Display channel-specific information and branding
  • Fetch channel configuration for your application
  • Get channel translations for multi-language support
  • Check maintenance mode status and allowed IPs
  • Retrieve channel themes and display settings
  • Access channel logos and branding assets
  • Build channel-specific pages and configurations
  • Handle channel-based routing and localization

This query returns comprehensive channel data including logos, favicons, themes, all translations, and maintenance mode settings.

Arguments

ArgumentTypeDescription
idID!Channel ID in format /api/shop/channels/{id} or numeric ID.

Possible Returns

FieldTypeDescription
idID!Unique channel API identifier.
_idInt!Numeric channel ID.
codeString!Unique channel code (e.g., 'default', 'mobile').
timezoneString!Channel timezone (e.g., 'UTC', 'US/Eastern').
themeStringTheme name assigned to this channel.
hostnameString!Channel hostname/domain.
logoStringFile path to channel logo.
faviconStringFile path to channel favicon.
isMaintenanceOnBoolean!Whether maintenance mode is enabled.
allowedIpsStringComma-separated IPs allowed during maintenance (CIDR notation supported).
createdAtDateTime!Channel creation timestamp.
updatedAtDateTime!Last update timestamp.
logoUrlStringFull URL to channel logo image.
faviconUrlStringFull URL to channel favicon image.
translationChannelTranslation!Default locale translation.
translation.idID!Translation identifier.
translation._idInt!Numeric translation ID.
translation.channelIdInt!Associated channel ID.
translation.localeString!Language locale code (e.g., 'en', 'ar', 'fr').
translation.nameString!Channel name in current language.
translation.descriptionStringChannel description.
translation.maintenanceModeTextStringCustom maintenance mode message.
translation.createdAtDateTime!Translation creation timestamp.
translation.updatedAtDateTime!Translation update timestamp.
translationsChannelTranslationCollection!All available translations.
translations.edges[Edge!]!Translation edges with cursors.
translations.edges.nodeChannelTranslation!Individual translation.
translations.edges.cursorString!Pagination cursor for this translation.
translations.pageInfoPageInfo!Pagination information.
translations.pageInfo.hasNextPageBoolean!More translations available.
translations.pageInfo.hasPreviousPageBoolean!Previous translations available.
translations.pageInfo.startCursorStringFirst translation cursor.
translations.pageInfo.endCursorStringLast translation cursor.
translations.totalCountInt!Total translations for this channel.

IP Allowlist Format

The allowedIps field supports multiple formats:

FormatExampleDescription
Single IP192.168.1.1Exact IP address
Multiple IPs192.168.1.1,192.168.1.2Comma-separated addresses
CIDR Notation192.168.1.0/24Subnet range
Mixed127.0.0.1,10.0.0.0/8Combination of formats

Use Cases

1. Channel Detail Page

Use the "Complete Details" example to display full channel information with all metadata.

2. Branding Configuration

Use the "With Branding Assets" example to get logos and favicons for dynamic theming.

3. Maintenance Mode

Use the "Maintenance Details" example to check if channel is under maintenance and display appropriate messages.

4. Multi-Language Support

Use the "With All Translations" example to display channel information in all languages.

5. Channel Routing

Use the basic query to get channel hostname and timezone for routing and localization.

Best Practices

  1. Cache Channel Data - Channels change infrequently, cache the response per channel
  2. Check Maintenance Mode - Always verify isMaintenanceOn status before displaying content
  3. Include Translations - Fetch all translations for multi-language support
  4. Validate IP Allowlist - Verify user IP against allowedIps during maintenance
  5. Use Correct ID Format - Use /api/shop/channels/{id} format when available
  6. Apply Theme Dynamically - Use theme field to load theme-specific CSS/configuration
  7. Display Localized Messages - Use translations for maintenance messages in user's language

Maintenance Mode Details

During maintenance mode:

  • Set isMaintenanceOn to true
  • Configure allowedIps to allow specific IP addresses
  • Display localized maintenanceModeText to users
  • Redirect non-allowed users to maintenance page
  • Support CIDR notation for flexible IP ranges

Released under the MIT License.