Skip to main content
Level 3
May 23, 2022

[GraphQL] Calling GraphQL endpoint programatically from within AEM (OSGi bundles)

Hi All, 

 

We'd like to make calls to GraphQL endpoint programatically from within AEM (OSGi bundles).

Can help share how to best do it?

 

Should we use https://github.com/adobe/aem-headless-client-java?  Is this Java client designed to be used inside AEM or outside AEM?

Or what about using HTTP Client Factory in AEM? https://kiransg.com/2021/11/08/aem-invoke-api-how-to-use-http-client-factory/ 

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

5 replies

Bhuwan_B
Community Advisor
Community Advisor
May 23, 2022

@baoyu_li you can use GraphiQL Interface to directly input, and test queries (The interface should be installed separately, the interface can be downloaded from Adobe software distribution).

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

Translate
baoyu_liAuthor
Level 3
May 23, 2022

thanks @bhuwan_b , but we want to call it programatically using Java in AEM. 

Translate