GraphQL error on AEM 6.5 - did not yield a Content Fragment | Community
Skip to main content
Mario248
Level 7
April 9, 2025

GraphQL error on AEM 6.5 - did not yield a Content Fragment

  • April 9, 2025
  • 1 reply
  • 691 views

Team - I am facing weird issue on graphql. I have created a persistent query and it works fine in GraphQL Explorer (/aem/graphiql.html) but the same is not working on PQ query.I have verified that the Content Fragment Model exists in AEM DAM, and I can see the correct response when running the same query in the GraphQL Explorer. But for some reason, it’s not working when accessed via the Persistent Query endpoint

 

https://localhost:4502/graphql/execute.json/e-commerce/commerce-content;contentFragmentLocation=/content/dam/commerce/us/clothing-all/category1/2024/sub-category/belt-1;variation=master

 

Any idea what does it mean by "did not yield a Content Fragment"?

{ "errors": [ { "message": "Exception while fetching data (/commerce-content) : Path: '/content/dam/commerce/us/clothing-all/category1/2024/sub-category/belt-1' did not yield a Content Fragment", "locations": [ { "line": 2, "column": 3 } ], "path": [ "commerceContentByPath" ], "extensions": { "classification": "DataFetchingException" } } ], "data": null }

 

 

Error Log

notprivacysafe.graphql.execution.SimpleDataFetcherExceptionHandler Exception while fetching data (/commerce-content) : Path: '/content/dam/commerce/us/clothing-all/category1/2024/sub-category/belt-1' did not yield a Content Fragment com.adobe.cq.dam.cfm.graphql.ContentFragmentFetcher$MissingContentFragmentException: Path: '/content/dam/commerce/us/clothing-all/category1/2024/sub-category/belt-1' did not yield a Content Fragment at com.adobe.cq.dam.cfm.graphql.ContentFragmentFetcher.fetch(ContentFragmentFetcher.java:57) [cq-dam-cfm-graphql:0.0.1.CQ650-B0036] at com.adobe.aem.graphql.sites.adapters.sling.DefaultDataFetcher.get(DefaultDataFetcher.java:251) [com.adobe.aem.graphql.sling-adapter:0.0.1.CQ650-B0008] at org.apache.sling.graphql.core.engine.SlingDataFetcherWrapper.get(SlingDataFetcherWrapper.java:45) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.execution.ExecutionStrategy.invokeDataFetcher(ExecutionStrategy.java:309) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.execution.ExecutionStrategy.fetchField(ExecutionStrategy.java:286) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.execution.ExecutionStrategy.resolveFieldWithInfo(ExecutionStrategy.java:212) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.execution.AsyncExecutionStrategy.execute(AsyncExecutionStrategy.java:55) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.execution.Execution.executeOperation(Execution.java:161) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.execution.Execution.execute(Execution.java:104) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.GraphQL.execute(GraphQL.java:557) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at graphql.GraphQL.lambda$parseValidateAndExecute$11(GraphQL.java:476) [com.adobe.aem.com.adobe.aem.graphql-java-wrapper:0.0.1.CQ650-B0008] at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:995)

 

1 reply

sarav_prakash
Community Advisor
Community Advisor
April 29, 2025

Duplicate to https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/hi-aem-community-facing-issue-while-accessing-content-fragment/m-p/564745

 

Could be permission, are you running admin user for both graphiQL editor and PQ?

Second could be editor was author and PQ is publisher. Make sure to publish your CF. It can be bad browser cache also. clearing browser cache could help.