graphQl support for rendering multi lingual content and caching strategy | Community
Skip to main content
Adobe Employee
November 25, 2022
Solved

graphQl support for rendering multi lingual content and caching strategy

  • November 25, 2022
  • 1 reply
  • 1126 views

We are using GraphQL persistent queries (GET with query variables) and want to cache the response at Dispatcher / CDN level. Need some info around 2 usecases which we are trying to achieve via graphql - 

 

1) Achieve Multi language support via graphql
2) Cache grapql response with respect to different language and variables respectively..

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by krati_garg

@nidhigurani 

Unfortunately, AEM MSM does not support Content Fragments as of yet. But it supports MSM in Assets. And hence we can add Content Fragments to Language Translation as part of Assets.

Please find below link, by far the best tutorial I could find for this:
https://experienceleague.adobe.com/docs/experience-manager-learn/sites/content-fragments/content-fragments-translation-feature-video-use.html?lang=en

 

1 reply

krati_garg
Adobe Employee
Adobe Employee
November 25, 2022

Hi @anikaag 

1. You will have to elaborate on first question, what kind of support are you expecting out of graphql for multi language support. Elaborate on usecase.

2. For Caching Graphql Queries - use Persisted Queries. Below are few documentation that should help you with Cach Configuration and leveraging on Persisted Queries:

 

https://kiransg.com/2022/02/01/caching-aem-graphql-queries-with-content-fragment/

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/persisted-queries.html?lang=en#caching-persisted-queries

https://experienceleague.adobe.com/docs/experience-manager-learn/getting-started-with-aem-headless/graphql/advanced-tutorial/graphql-persisted-queries.html?lang=en#review-graphql-persisted-queries-configuration-setting

 

Adobe Employee
November 28, 2022

Hi @krati_garg 

Requirement here is that we need content on the basis of locale. For ref , on EN locale we need content in english language from and on HI locale we need content in hindi

krati_garg
Adobe Employee
krati_gargAdobe EmployeeAccepted solution
Adobe Employee
November 28, 2022

@nidhigurani 

Unfortunately, AEM MSM does not support Content Fragments as of yet. But it supports MSM in Assets. And hence we can add Content Fragments to Language Translation as part of Assets.

Please find below link, by far the best tutorial I could find for this:
https://experienceleague.adobe.com/docs/experience-manager-learn/sites/content-fragments/content-fragments-translation-feature-video-use.html?lang=en