close

Filter

loading table of contents...

Headless Server Developer Manual / Version 2010

Table Of Contents

4.8.1 Simple Article Query

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.

Search Results

Table Of Contents