import graphql.language.AstPrinter;
import graphql.language.Document;
import graphql.parser.Parser;
public class GraphqlQueryFormatter {
public static void main(String[] args) {
String gql = "query { getEmployee (employeeId:"4859493") { name dob department } ";
Parser parser = new Parser();
Document doc = parser.parseDocument(gql);
System.out.println(AstPrinter.printAst(doc));
}
}
AddThis
Wednesday, 21 October 2020
How to format graphql query string in Java
Subscribe to:
Post Comments (Atom)
Solving real time queries using java 8 features stream api with examples
package com.pse; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java...
-
In java 8 default capacity of ArrayList is 0 until we add at least one object into the ArrayList object (You can call it lazy initializati...
-
Our Browser is showing a lot of content and there’s not a trace of it in index.html. How is this happening? What’s with this weird <a...
-
When I first started down the path of CSS preprocessors I was overwhelmed by the different options (sass, less, stylus), the differences in...
No comments:
Post a Comment