localsetup setup Headless & GraphQL error | Community
Skip to main content
November 30, 2024
Solved

localsetup setup Headless & GraphQL error

  • November 30, 2024
  • 1 reply
  • 1048 views

HI Team,

 

i am trying to setup Headless & GraphQL local setup using wknd site but getting below error

 

Error: SyntaxError: Unexpected end of JSON input

 

 

 

 

even checked CORS configuration are in place already in local AEM

 

/content/cq:graphql/wknd-shared/endpoint.json

@arunpatidar @estebanbustamante 

 

Best answer by Aditya_Chabuku

Hi @sonuk85184451 ,

 

The repository path of the GraphQL for AEM global endpoint is:

/content/cq:graphql/global/endpoint

For which your app can use the following path in the request URL:

/content/_cq_graphql/global/endpoint.json

 

 

I found this Article it will be helpful to you.

Refer https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/headless/graphql-api/graphql-endpoint#enabling-graphql-endpoint 

Also, Here are links to Video Series, which explain better 

  1. https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headless/graphql/video-series/modeling-basics 
  2. https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headless/graphql/overview 

Happy Coding,

 

1 reply

Aditya_Chabuku
Community Advisor
Community Advisor
December 5, 2024

Hi @sonuk85184451 ,

 

I think you end point was wrong, please try this 

 

/content/graphql/global/endpoint.json

 

Follow this page for more clarification.

https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headless/graphql/quick-setup/local-sdk#prerequisites 

 

Happy Coding,

 

Thanks,Aditya Chabuku
December 9, 2024

@aditya_chabuku -  yes , documentation says 

/content/graphql/global/endpoint.json

 but after installing the wknd package i see end point is 

/content/cq:graphql/wknd-shared/endpoint.json 

 

how global one will work to fetch wknd content fragments ?

 

thanks

Arun

Aditya_Chabuku
Community Advisor
Aditya_ChabukuCommunity AdvisorAccepted solution
Community Advisor
December 9, 2024

Hi @sonuk85184451 ,

 

The repository path of the GraphQL for AEM global endpoint is:

/content/cq:graphql/global/endpoint

For which your app can use the following path in the request URL:

/content/_cq_graphql/global/endpoint.json

 

 

I found this Article it will be helpful to you.

Refer https://experienceleague.adobe.com/en/docs/experience-manager-cloud-service/content/headless/graphql-api/graphql-endpoint#enabling-graphql-endpoint 

Also, Here are links to Video Series, which explain better 

  1. https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headless/graphql/video-series/modeling-basics 
  2. https://experienceleague.adobe.com/en/docs/experience-manager-learn/getting-started-with-aem-headless/graphql/overview 

Happy Coding,

 

Thanks,Aditya Chabuku