Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideLegal TermsGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Content base types

Describes content base types registered in the GraphQL schema for querying content in Optimizely CMS (SaaS).

Optimizely Content Management System (CMS) (SaaS) registers a set of base schema types in the Optimizely Graph's GraphQL schema, which content types inherit from. You can use these base schema types to query your content in Optimizely Graph.

Hierarchy in Optimizely Graph

The following diagram illustrates the type hierarchy in Optimizely Graph, specifically focusing on how developer-defined content types in CMS (SaaS) relate to the default base schema types. Understanding this hierarchy helps you create structured content types and enables consistent querying using Optimizely Graph.

  • Default base schema types – These are the predefined types that serve as parent types for various content categories. The base schema types are prefixed with an underscore (_) and are represented by blue boxes.
  • Developer-defined content types – Custom content types created by developers in CMS (SaaS). See Manage content types from the UI or Manage content types using the REST API. They inherit from the corresponding default base schema types and are represented in gray boxes.
    For example
    • a specific product page type ( NewsPage) might inherit from _Page.
    • a small section of a webpage designed to capture a user's attention by providing a brief preview of content (TeaserBlock) might inherit from _Component (block).
    • both _Page and _Component inherit from _Content.

Example queries

📘

Note

The base types are prefixed with _ to distinguish them from user-defined content types.

The base types can be used to query over sets of content types. To query overall content types, you can use the common base type _Content.

query AcrossAllContent {
  _Content
  {
    items{
      _metadata {
        displayName
      }
    }
  }
}

To search over content types of a specific base type, like Image, then you can use the base type _Image.

query AcrossAllImages {
  _Image
  {
    items{
      _metadata {
        displayName
      }
    }
  }
}