Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges


GraphQL queries call using Sling servlet and models


Community Advisor

Hi Team,


I want to send the GraphQL queries to Magento and then Magento sends back a response.


can anyone help me how I can achieve this by using sling servlet and models.


I investigated about it but haven't found anything in google.





@mhaack @Daniel_Gordon 


Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution


Correct answer by
Community Advisor

@Prince_Shivhare the POC which I did an year back should help you ,check below article.


View solution in original post

5 Replies


Correct answer by
Community Advisor

@Prince_Shivhare the POC which I did an year back should help you ,check below article.



Community Advisor

Hi Raj,

I saw your article and having information in detail.


but your article says to connect it with CIF first and then product details component to product data?

will it work without the CIF?

our requirement is to call the using the graphql query hit Magento instance and get the response.


Can you help me here?


Community Advisor

Hi Prince, the CIF helps use to make the development faster and it is an accelerator for your CIF project, when it comes to hitting graphql then you need to make a http request by passing inputs as json format. check below links




Hi @Prince_Shivhare  this is easy to solve 🙂


The entire CIF Core Components project is your example. It provides the graphql client (which is independent form the backend) which accepts any GraphQL query. For Magento we provide addition helpers and a full step of data model classes representing the Magento Schema. This allows you to work with Java objects instead with GraphQL query strings. For example the product teaser component 


My colleague Mark and me did a tech talk during last conf and CIF GraphQL usage and customization:




Good to see you back, Markus in the AEM community. And Thank you for posting an answer here.