TerminusDB Logo all white svg
Search
Close this search box.
GraphQL CMS

GraphQL CMS – Why GraphQL is a Must Have

TerminusCMS is a GraphQL CMS. In 2022 we decided to implement GraphQL inside TerminusDB to be appealing to those building applications with TerminusDB and also to those developing headless CMS for complex content environments with TerminusCMS.

GraphQL is a query language that was developed by Facebook and released as open-source technology in 2015. It provides a flexible and efficient way for clients to request data from servers, making it a powerful tool for building modern web and mobile applications.

One benefit of using GraphQL with a content management system (CMS) is that it allows for more efficient data fetching and retrieval. Instead of having to make multiple requests to different endpoints to retrieve the data needed for a particular view or application, a client can use a single GraphQL query to retrieve all the necessary data in a single request. This greatly improves application performance and scalability. It also reduces the amount of network traffic and data transfer between the client and server.

Another advantage of GraphQL with a CMS is that it allows for more precise and flexible data querying. With traditional REST APIs, also available in TerminusCMS, the shape and structure of the data that is returned are fixed and determined by the server. This can lead to situations where the client ends up receiving more data than it needs, or has to make multiple requests to get the data it needs.

With GraphQL, the client has more control over the data it receives. It can specify exactly which fields and data it needs in its query. This allows for more efficient and targeted data retrieval, as well as more flexibility in how the data is used by the client.

In addition, GraphQL also provides a strong type system that allows the server to define the structure and relationships of the data it exposes. This makes it easier for clients to understand the data they are working with and can help prevent errors and inconsistencies in the data. We have also made it so GraphQL automatically generates its schema from your content model for easier and faster query build.

Our aim with GraphQL is to make TerminusCMS the smoothest and most powerful GraphQL experience around and to be the leading GraphQL CMS.

TerminusCMS also ships with a powerful Datalog query language called WOQL. We are incorporating the graph query power of WOQL into GraphQL so that is not only an API language, but a full-blown graph query language enabling you to build queries such as – 

  • Path queries are used to find the shortest or longest path between two nodes in a graph.
  • Subgraph queries are used to find all subgraphs that match a specified pattern within a larger graph.
  • Reachability queries are used to determine whether two nodes in a graph are connected, and if so, how they are connected.
  • Centrality queries are used to identify the most important nodes in a graph based on various metrics such as degree, betweenness, or closeness centrality.
  • Clustering queries are used to identify groups of nodes that are more densely connected .
  • Community detection queries are used to identify distinct communities or modules within a graph.

Using a GraphQL CMS provides many benefits, including improved performance and scalability, more precise and flexible data querying, and a language-agnostic way for front-end developers to build. These advantages make it an attractive option for building modern web and mobile applications that need to efficiently and effectively work with a headless CMS.

Other GraphQL Stories

Implement GraphQL in 14 days

How to implement GraphQL in fourteen days

A technical article discussing how how Gavin and Matthijs implemented GraphQL. TerminusDB fits naturally into the GraphQL environment and we’re confident it will quickly be one of the best platforms around for serving content via GraphQL.

Read More »

TerminusCMS

Latest Stories

Using CMS for Technical Docs - Schema Design

Using our CMS for Technical Documentation – Part 1, Schema Design

We recently replaced Gitbook with TerminusCMS for a much-needed upgrade of our technical documentation. In order to help our users understand TerminusCMS and to learn from our mistakes, we’ve written a three-part blog that talks about the steps and methods we used to use TerminusCMS as the backend for our docs. This is part-1, looking at the schema.

Read More »