Headless Server Developer Manual / Version 2101
Table Of Contents
The following GraphQL query is a simple example for fetching data
from a CMArticle document. It is based on the GraphQL schema defined
in the file schema.graphql
:
query ArticleQuery { content { article(id: "2910") { title teaserTitle teaserText picture { name creationDate alt uriTemplate } } } }
Of course, you will have to change the article id parameter to a value which is valid in your content server.
Note that the query includes a field called uriTemplate that can be used by a client to construct a URL to the cropped image data by substituting the cropName and width parameters. The file name section at the end of uriTemplate is optional and only for SEO purpose.