Headless Server Developer Manual / Version 2401
Table Of Contents
The types and interfaces in the schema file
content-schema.graphql
define a subset of the CoreMedia Blueprint content model in GraphQL SDL terms.
The Blueprint content types are mapped to GraphQL interfaces of the same name, while an object type
with the suffix Impl
serves as the implementation of these interfaces.
From the GraphQL field content
of query root type,
data of CoreMedia CMS content items is reachable via GraphQL queries (some fields omitted for brevity):
type Query { content: ContentRoot } type ContentRoot { content(id: String!, type: String): Content_ @fetch(from: "getContent(#id,#type)") article(id: String!): CMArticle @fetch(from: "getContent(#id, 'CMArticle')") picture(id: String!): CMPicture @fetch(from: "getContent(#id, 'CMPicture')") page(id: String!): CMChannel pageByPath(path: String!): CMChannel @fetch(from: "@byPathAdapter.to().getPageByPath(#path, #context['caasViewName'])") site(siteId: String, id: String @deprecated(reason: "Arg 'id' is deprecated. Use 'siteId' instead.")): Site sites: [Site]! }
The following sections will discuss some example queries using these content root fields.