Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Flush the GraphQL Persisted Query while publishing Content Fragment

Avatar

Level 8

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

1 Accepted Solution

Avatar

Correct answer by
Level 8

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

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" }

View solution in original post

1 Reply

Avatar

Correct answer by
Level 8

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

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" }