Skip to content

Get Channels

About

The channels query retrieves all store channels configured in your Bagisto instance. Use this query to:

  • Fetch all available sales channels for your store
  • Display channel-specific information and branding
  • Get channel translations for multi-language support
  • Check maintenance mode status and allowed IPs
  • Retrieve channel themes and configuration
  • Build channel switcher or store selector features
  • Access channel logos and branding assets
  • Manage multi-channel deployments

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

Arguments

ArgumentTypeDescription
firstIntNumber of channels to return (forward pagination). Max: 100.
afterStringPagination cursor for forward navigation.
lastIntNumber of channels for backward pagination. Max: 100.
beforeStringPagination cursor for backward navigation.

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.
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.
translations.pageInfoPageInfo!Pagination information.
translations.totalCountInt!Total translations for this channel.
pageInfoPageInfo!Pagination information.
pageInfo.hasNextPageBoolean!More channels available.
pageInfo.hasPreviousPageBoolean!Previous channels available.
pageInfo.startCursorStringFirst channel cursor.
pageInfo.endCursorStringLast channel cursor.
totalCountInt!Total channels in system.

Use Cases

1. Multi-Channel Support

Use the "Complete Details" example to get all channel information for multi-channel deployments.

2. Channel Selection

Use the "Basic" example for rendering a channel/store selector in your frontend.

3. Maintenance Mode

Use the "Maintenance Mode Info" example to check if a 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 Branding

Use the complete details example to fetch logos and favicons for channel-specific branding.

Best Practices

  1. Cache Channel List - Channels change infrequently, cache the entire list
  2. Check Maintenance Mode - Always verify isMaintenanceOn status before redirecting users
  3. Include Translations - Fetch all translations for multi-language support
  4. Validate Hostname - Use hostname to route requests to correct channel
  5. Use Brand Assets - Fetch logoUrl and faviconUrl for consistent branding
  6. Respect Timezones - Use channel timezone for displaying dates and times

Released under the MIT License.