Posts

Showing posts with the label GraphQL

Configuring GraphQL and Running your first query in XM Cloud NextJs App using ContentSDK

Image
While working on real-world Sitecore projects, there are many scenarios where you need to fetch global content values that are reused across the entire site. Although we can retrieve item field values from data source items inside components in Next.js, there are times when we need to fetch content directly from the Sitecore CMS rather than through a component’s data source. One of the most recommended approaches for this requirement is to execute GraphQL queries which use the Sitecore Edge API under the hood and return data in a strongly-typed schema. In this blog, I will explain how to configure and execute GraphQL queries in a Next.js application using the Sitecore Content SDK . About Sitecore ContentSDK Sitecore XM Cloud brings a headless, API-first approach to content delivery. While GraphQL queries can be executed directly through Edge endpoints, Sitecore has introduced the Sitecore Content SDK to make this development experience even easier. The Sitecore Content SDK is a l...