Today I came with an exciting topic, AEM Headless CMS with GraphQL.
Before going into more details about this, a few words about GraphQL
GraphQL is primarily designed to expose the content fragment data to downstream applications.
It is a query language API.
In runtime execution, these queries will run and return the results
The result set would be in JSON format
The data format is platform agnostic
GraphQL has become very popular for headless use cases, since client apps can create query to return what they exactly want.
Client apps like mobile, desktop and IoT devices can create GraphQL queries for the content. They need to power their apps based on the queries.
The most important benefit is that clients get what they want.
You can fetch multiple resources with a single request.
I won’t let you wait any longer. To implement AEM headless CMS using GraphQL to expose content to third party apps (React App in our case ) there are some steps to follow.
Installation of required Software
Create Content Fragment Models
Author Content Fragment Model
Explore GraphQL APIs
Expose data from external app
Install the AEM SDK
I have used the AEM as a Cloud Service SDK to explore AEM’s GraphQL APIs.
Download and install the latest version of AEM SDK from Software Distribution Set