Combining Java CMS and GraphQL to Simplify Headless Content Management

Headless content management

With the release of dotCMS 5.1, our enterprise Java CMS now natively supports GraphQL. In this article, I’ll walk you through the basics of GraphQL as an API and query language, how it differs from REST, and how dotCMS and GraphQL come together to streamline headless content management.

You might also like:  My GraphQL Thoughts After Almost Two Years

What Is GraphQL?

GraphQL is an open-source data query language for APIs. It enables users to specify exactly what data they would like to retrieve from the server. Developed by Facebook in 2012, GraphQL became open-sourced in 2015. It is used internally for mobile applications, and it is widely seen as an alternative to the REST (Representational State Transfer) architecture.

GraphQL: Core Features, Architecture, Pros, and Cons

When you talk about API design, the first thing that probably comes to mind is Representational State Transfer (REST). A standard for data retrieval from the server, it’s based on accessing data by URLs.

In 2000, when REST was developed, client applications were relatively simple, development pace wasn’t nearly where it is today, and, as a result, REST was a good fit for many applications. REST gave us important concepts for API design – stateless servers and structured access to resources. However, since that time APIs have gotten more complex and data-driven affected by the following factors: