GraphQL for aem 6.5.13 | Community
Skip to main content
sreenu539
Level 7
June 23, 2023
Solved

GraphQL for aem 6.5.13

  • June 23, 2023
  • 2 replies
  • 904 views

has anyone successfully used GraphQL on a 6.5.13 on premise instance.

 

I have GraphQL 1.0.5 package onto my 6.5.13 instance. I tried to do preview on content fragments but always get error “can not generate query” 

 

Is it even supported on aem6.5.13?

 

thanks,

sri

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 Tanika02

Hello @sreenu539 - 

 

It is either an issue with the GraphQL query generation or the underlying GraphQL setup.

 

To rule out these please follow below documentations : 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html 

 

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/content-fragments/understand-content-fragments-and-experience-fragments.html?lang=en 

 

Additionally, ensure that the content fragment you are trying to preview has a valid and accessible preview URL.

  • Go to http://localhost:4502/aem/cfm/models.html/content
  • Locate the content fragment model for which you want to enable preview and click on it
  • In the content fragment model editor, click on the "Policies" tab.

  • Under the "Fragment Policies" section, ensure that the "Allow Preview" option is checked.
  • Additionally, make sure that the "Preview Mode" is set to "Standard".

 

2 replies

Tanika02
Level 7
June 23, 2023

Hello @sreenu539 -

 

If you have installed the GraphQL 1.0.5 package on your AEM 6.5.13 instance, then you can use GraphQL.

 

can you validate couple of things ? 

  • Ensure that all the GraphQL related necessary dependencies and configurations are properly resolved.
  • Can you also check the GraphQL endpoint, schema definitions, and permissions.
  • Can you share the error logs for more information around what is causing this issue?
sreenu539
sreenu539Author
Level 7
June 23, 2023

Hi @tanika02 @aanchal-sikka 

 

use case: consume content fragments in a non-aem js application.

 

Below is the error I get when a content fragment preview:

 

Steps done:

1.  Installed below package graphql Index package 1.0.5

2. create end points

3. Added csrf filter entries

4. tried end point schema, irrespective of which endpoint, I get below output which is not a real schema of any content fragments to get queries, results.

http://localhost:4502/content/cq:graphql/site/endpoint.GQLschema

 

 

 

 

 

 

Tanika02
Tanika02Accepted solution
Level 7
June 23, 2023

Hello @sreenu539 - 

 

It is either an issue with the GraphQL query generation or the underlying GraphQL setup.

 

To rule out these please follow below documentations : 

https://experienceleague.adobe.com/docs/experience-manager-cloud-service/content/headless/graphql-api/content-fragments.html 

 

https://experienceleague.adobe.com/docs/experience-manager-learn/sites/content-fragments/understand-content-fragments-and-experience-fragments.html?lang=en 

 

Additionally, ensure that the content fragment you are trying to preview has a valid and accessible preview URL.

  • Go to http://localhost:4502/aem/cfm/models.html/content
  • Locate the content fragment model for which you want to enable preview and click on it
  • In the content fragment model editor, click on the "Policies" tab.

  • Under the "Fragment Policies" section, ensure that the "Allow Preview" option is checked.
  • Additionally, make sure that the "Preview Mode" is set to "Standard".

 

aanchal-sikka
Community Advisor
Community Advisor
June 23, 2023

Hello @sreenu539 

 

Try to enable graphQL endpoint as per below link.

AEM GraphQL API for use with Content Fragments | Adobe Experience Manager

 

Aanchal Sikka