CMS architecture
Headless CMS guide
Back to Headless CMS guide

Overcoming the challenges of headless CMS: How Brightspot is innovating with GraphQL

View of computer code on laptop screen

Discover the pros and cons of a headless CMS with GraphQL and learn how Brightspot has developed innovative solutions to tackle four primary issues associated with it.

In many ways, a headless content management system can provide ultimate freedom. By removing the presentation system and instead delivering just data, it allows you to build your front end using whichever technologies are best-suited to your needs. The development of the public GraphQL specification exposed the concept of headless architecture to a new audience. What’s more, GraphQL’s establishment as an open standard cemented headless platforms as in-demand options.

Given all that, it may come as a surprise that a headless system using GraphQL isn’t right for everyone. As a leading publishing provider, we’re well versed in the challenges of using GraphQL—and we’ve identified innovative solutions to address them.

Four challenges of using a headless CMS with GraphQL

There are four main obstacles that developers need to address when using a headless CMS:

1) Performance/Caching: The large size of GraphQL queries—up to 10K—can make fetching the data a challenge, requiring POST requests. A CDN can’t feasibly cache these requests. The front-end app can, but such client-side caching isn’t a possibility for larger websites.

2) Preview: The rendering of the application occurs outside the CMS, and the CMS cannot create a live preview. There is no built-in way to see how publishing changes in the CMS affect the presentation of the site you’re working on.

3) Image Sizes: The front-end application that uses specific image sizes is separate from the CMS. Therefore, a headless CMS is unable to access the data it needs to run its rich image editing and cropping capabilities, and the front-end application cannot access the curated images for rendering.

4) Security: The code in the client's browser is an open book, as is the data transferred from APIs. Anyone can access this data—a security concern that GraphQL attempts to address by requiring developers to selectively fetch only the fields they need. However, a malicious user would have no problem querying to fetch additional data that the app doesn’t use.

How Brightspot solves headless CMS challenges

Brightspot offers solutions to each of these problems. To address the issue of massive GraphQL queries, Brightspot employs a technique called "Automatic Persisted Queries,” which replaces large query text with a generated ID, then registers the ID so that the app can map the ID to that query each time it’s requested.

Brightspot offers custom preview implementations using a service from . Alternately, Brightspot can create an ID that will create a preview at a given URL. The ID will prompt the return of data specific to the content being modified using a call to the GraphQL API.

To handle image sizing, users can register a configuration file of their standard image sizes with Brightspot, which will display their defined crops in the image editor and return image URLs from the GraphQL API.

Regarding security, Brightspot’s View System is situated between the raw Database Model and the ViewModel that the GraphQL API returns. The data is sanitized on the back end before it gets sent back to the client, so malicious users will not be able to access any impermissible data.

In conclusion, while a headless CMS isn’t right for every organization, many developers are thrilled with the flexibility and freedom it provides. The appeal is only amplified with Brightspot offering solutions to the major challenges that a headless configuration presents.

Share

Related headless CMS resources

Learn the difference between traditional (or coupled) CMS, decoupled CMS, and headless CMS architecture, as well as the pros and cons for each.
GraphQL is the programming language that enables flexible connection with programming APIs that support headless CMS integrations like the one offered through Brightspot.
Learn about headless CMS: a modern architecture that allows digital teams to adapt to new technology and deliver content across multiple channels.
Learn what a headless content management system (CMS) is, how it differs from traditional CMS architectures and how the flexibility of Brightspot's hybrid-headless CMS approach can future-proof your business.
Here are five benefits developers—and, by extension, their projects—get from a headless CMS.
As a technical leader, finding the right CMS for your organization will require flexibility, and that isn’t always easy for some platforms.
Headless CMS offers a future-proofed framework in our evolving digital age, and the developer flexibility, personalized content capabilities and speedy content delivery offered through headless give companies a competitive edge. Here are 10 things to consider as you consider shifting to headless CMS.
Modern headless content management system platforms can give you the flexibility you need to change—but there are four things to consider first.
Is a headless CMS the superior content management system solution? The answer, of course, depends, but ignore the hype and get the information you need to make the most informed decision to suit your exact business needs.
With today's always-on technology, a headless CMS approach offers the benefits of flexibility, speed and scalability for digital and editorial leads at media companies.
While headless CMS is not a new concept in the digital space, today it’s an increasingly attractive proposition for businesses looking to move their digital transformation efforts forward in an impactful way.
To be successful, brands must provide great digital customer experiences. A headless CMS solution simplifies programming efforts by removing front- and back-end dependencies, freeing up teams to work in parallel on projects that bring quickest value to both customers and the business.

Let us give you a demo

Hear how Brightspot can turn your digital strategy goals into a reality and see how the lives of your content creators and developers will be changed using our platform.

Request Demo