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
  • 3306 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?

 

February 15, 2023

Graphql is working fine once I added global endpoint in CSRF filter

/content/cq:graphql/global/endpoint

 

Not sure why this is needed as I have added all CF to custom site. 


Hi @pradeepdubey82 and @krati_garg ,

I added entries in CSRF excluded path filter as below but still have same issue.

 

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