GraphQL Demo using Apache Solr
#Prerequisite - Install Apache Solr using the link https://lucene.apache.org/solr/guide/7_0/installing-solr.html
The steps to run and test the application:
- Run the application as a Spring Maven Application
- You can use postman to run the endpoints
- You can use the solr interface to execute GraphQL queries at "http://localhost:8983/solr"
#Sample Solr Queries/Mutations:
(in our case Order)
-
Mutation:
a. SelectDocumentsoption under the selected core
b. You can now add documents either by adding it in JSON or uploading a json file
c. HitSubmit Document -
Query:
a. Select theQueryoption under the selected core
b. You can specify the parameters which you want to query inqtextbox c. Sample queries as below:
orderDescription:abc
orderDescription:abc
OR
productName:qwerty
You can try various combinations like above using keywords like AND, OR, etc.
Reference link for Apache Solr Querying Documentation: "https://lucene.apache.org/solr/guide/6_6/common-query-parameters.html"