@naan_raja , Graph QL is used by application outside AEM to consume the content fragments thru Graph QL API by end points. AEM internally converts the Graph QL API call to SQL query and executes the query and sends the result.
If you want to consume content fragments inside the AEM, i would think about using OSGI Service running querybuilder API or sling model to read the CFs.
If you still want to consume the Graph QL API, you can make the java POST call to end points from services.