cancel
Showing results for 
Search instead for 
Did you mean: 

How can I check that GraphQL is executing query to elasticsearch instead of mysql database ?

How can I check that GraphQL is executing query to elasticsearch instead of mysql database ?

Hi all,

 

I am completely new to Magento world. That is great platform. I'm using magento latest version 2.4.2.

 

My question is how can I verify that the GraphQL query-ing into elasticsearch, not database?

 

The reason is I am building headless ecommerce with Magento so I need to make sure that the query should be fast in searching, and elasticsearch is perfect for that.

 

I can verify (using chrome tool) that the data already got index into elasticsearch when create an new Product from Admin UI. That is 'write' data into elasticsearch. But cannot (or I don't know yet) verify 'read' data from elasticsearch.

 

I really appreciate any help.

 

Thanks.

4 REPLIES 4

Re: How can I check that GraphQL is executing query to elasticsearch instead of mysql database ?

We'll start with a simple file structure and a simple sample code. To follow along with this tutorial, create a GraphQL directory, and inside the directory create an npm project using npm init -y. Then create the server.js file which will be the main file. For the complete code, copy using the instructions in the attached github repository. 

2 player games

Re: How can I check that GraphQL is executing query to elasticsearch instead of mysql database ?

Hi @glengmoone6635 

 

Thanks for your reply. Can you put the link for tutorial that you mentioned?

 

From what you posted, i guess that you are talking about setup a NodeJS as caching server?

 

Thanks

 

Re: How can I check that GraphQL is executing query to elasticsearch instead of mysql database ?

sorry, maybe I misunderstood your question

Re: How can I check that GraphQL is executing query to elasticsearch instead of mysql database ?

Hi @glengmoone6635 don't worry. Thanks for your consideration.