This is a live example of using Integrated GraphQL and Connected GraphQL with a JSS app. For more information on GraphQL use in JSS, please see the documentation.
Integrated GraphQL executes GraphQL queries within the Layout Service endpoint, and merges the query results into the Layout Service result JSON. The query results can be seen by inspecting the Layout Service response.
Connected GraphQL executes GraphQL queries directly against the Sitecore GraphQL endpoint. This example runs the query server-side using component-level getStaticProps
/getServerSideProps
, a feature of the Sitecore JSS Next.js SDK. These are aggregated during the the Next.js page-level getStaticProps
/getServerSideProps
execution.