AEM6.5 SP13 | Graphql Not working | Community
Skip to main content
Level 5
December 14, 2022

AEM6.5 SP13 | Graphql Not working

  • December 14, 2022
  • 3 replies
  • 3339 views

Hi All,

 

I am using AEM6.5 SP13. I need to export content fragment headless content using graphql to external systems.

Every time I am running query on 

http://localhost:4502/content/graphiql.html

 

Getting below error.

 

{
"errors": [
{
"message": "Failed to execute 'text' on 'Response': body stream already read",
"stack": "TypeError: Failed to execute 'text' on 'Response': body stream already read\n at http://localhost:4502/content/graphiql.html:81:33\n at async https://unpkg.com/graphiql/graphiql.min.js:29:224769"
}
]
}

 

Could anyone suggest what am I missing here?

In tools --> general I could not see graphql query editor option.

 

Any help is highly appreciated.

 

Thanks,

Pradeep

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

3 replies

Saravanan_Dharmaraj
Community Advisor
Community Advisor
December 14, 2022
milind_bachani
Adobe Employee
Adobe Employee
December 14, 2022

Hi @pradeepdubey82 ,

 

Please exclude the endpoints in Adobe Granite CSRF Filter configuration.

 

 

Thanks,

Milind

Level 5
December 14, 2022

Excluded paths in CSRF, still same issue.

krati_garg
Adobe Employee
Adobe Employee
December 14, 2022

@pradeepdubey82 

Can you please share the screen shot of the query you are trying and resultant error.

 

Also, have you also installed following essential packages :

  1. Graph QL OAK Index (cfm-graphql-index-def-1.0.0.zip)
  2. GraphiQL Developer tool (graphiql-0.0.6.zip)

 

Also, please follow step by step process below, this should resolve any installation issues:

https://kiransg.com/2021/12/04/aem-content-fragments-with-graphql-getting-started-with-graphql/#:~:text=preview%20JSON%20output.-,Install%3A,-AEM%206.5.11%20(aem

Level 5
December 15, 2022

Hello Krati,

 

CF preview

 

 

Query editor

 

I have installed graphiql-0.0.6.zip but not cfm-graphql-index-def-1.0.0.zip, is this needed to run the graphql query?

 

Level 5
December 19, 2022

@pradeepdubey82 Please follow below blog for step by step process. This will answer all your queries:

https://www.albinsblog.com/2021/10/how-to-deliver-headless-content-through-graphql-api-and-content-fragments-in-aem.html#.Y6Bce3ZBw2w

 

Let me know, if you face any issue, in following these steps. It also explains how to query via external applications using curl command

 

 


Yes, since few days I am going through this article, in this article Albin has explained through basic authentication only, token based may be supporting in AEMAaCS not sure if it is there in AEM6.5

 

Using basic authentication and postman I am able to run all the requests GET,POST,PUT,DELETE on AEM6.5

 

-Best,

Pradeep