Hello,
For a headless implementation, its recommended to use GraphQL for filtering Content Fragments. Its a strict NO to use Querybuilder. The reason is GraphQL uses the Schema underlining the CF, which assures better query performance.
Solved! Go to Solution.
Views
Replies
Total Likes
Yes, it is possible to execute GraphQL queries to generate content from Content Fragments (CFs) in the context of AEM Sites. You can do this using the AEM GraphQL Client, which is a JavaScript library that provides a simple way to make GraphQL queries to AEM.
One way to benefit from the CF schema in AEM Sites is to use it to dynamically generate the structure of your pages. For example, you could use GraphQL to query for all of the CFs of a certain type, and then use the schema to determine how to render those CFs on the page.
Another way to benefit from the CF schema in AEM Sites is to use it to validate user input. For example, you could use GraphQL to query for the schema of a CF before accepting input from a user, and then use the schema to validate the input.
Should QueryBuilder be used for AEM Sites and GraphQL for HTTP requests only?
As a general rule of thumb, it is recommended to use GraphQL for all headless content delivery, including content delivery to AEM Sites. This is because GraphQL offers a number of advantages over QueryBuilder, including:
However, there are a few cases where it may make sense to use QueryBuilder instead of GraphQL:
Overall, GraphQL is the recommended API for headless content delivery in AEM Sites. However, there are a few cases where it may make sense to use QueryBuilder instead.
Documentation: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/sites/administering...
Views
Replies
Total Likes
Yes, it is possible to execute GraphQL queries to generate content from Content Fragments (CFs) in the context of AEM Sites. You can do this using the AEM GraphQL Client, which is a JavaScript library that provides a simple way to make GraphQL queries to AEM.
One way to benefit from the CF schema in AEM Sites is to use it to dynamically generate the structure of your pages. For example, you could use GraphQL to query for all of the CFs of a certain type, and then use the schema to determine how to render those CFs on the page.
Another way to benefit from the CF schema in AEM Sites is to use it to validate user input. For example, you could use GraphQL to query for the schema of a CF before accepting input from a user, and then use the schema to validate the input.
Should QueryBuilder be used for AEM Sites and GraphQL for HTTP requests only?
As a general rule of thumb, it is recommended to use GraphQL for all headless content delivery, including content delivery to AEM Sites. This is because GraphQL offers a number of advantages over QueryBuilder, including:
However, there are a few cases where it may make sense to use QueryBuilder instead of GraphQL:
Overall, GraphQL is the recommended API for headless content delivery in AEM Sites. However, there are a few cases where it may make sense to use QueryBuilder instead.
Documentation: https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/sites/administering...
Views
Replies
Total Likes