Flush the GraphQL Persisted Query while publishing Content Fragment | Community
Skip to main content
ShaileshBassi
Community Advisor
Community Advisor
October 10, 2022
Solved

Flush the GraphQL Persisted Query while publishing Content Fragment

  • October 10, 2022
  • 1 reply
  • 968 views

Hi,

Trying to flush the response of the GraphQL Peristed query when the corresponding content fragment is modified and published.

For achieving the same, tried to configure the rule in the "ACS AEM Commons - Dispatcher Flush Rules"

Rule - /content/dam/mysite/contentfragment/.*=/graphql/execute.json/mysite

 

Any pointer will help.

Thanks

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 Saravanan_Dharmaraj

You can check the comment section of this page https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html ,

Sample given for content fragments, you can try similar one

 

For clearing the cache of content fragments that are accessed via the API Assets using a URL such as /api/assets/somepath.json, you can use the rule:

prop.replication-action-type="INHERIT"
prop.rules.hierarchical=["/content/dam/(.*)=/api/assets/$1"]

You may also need to add a rule to your Dispatcher /invalidate section to clear .json files like this:
/4444 { /glob "*.json" /type "allow" }

1 reply

Saravanan_Dharmaraj
Community Advisor
Saravanan_DharmarajCommunity AdvisorAccepted solution
Community Advisor
October 10, 2022

You can check the comment section of this page https://adobe-consulting-services.github.io/acs-aem-commons/features/dispatcher-flush-rules/index.html ,

Sample given for content fragments, you can try similar one

 

For clearing the cache of content fragments that are accessed via the API Assets using a URL such as /api/assets/somepath.json, you can use the rule:

prop.replication-action-type="INHERIT"
prop.rules.hierarchical=["/content/dam/(.*)=/api/assets/$1"]

You may also need to add a rule to your Dispatcher /invalidate section to clear .json files like this:
/4444 { /glob "*.json" /type "allow" }