Package graphql.language
Class AstPrinter
java.lang.Object
graphql.language.AstPrinter
- Direct Known Subclasses:
PrettyAstPrinter
This can take graphql language AST and print it out as a string
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
This will pretty print the AST node in graphql language formatstatic void
This will pretty print the AST node in graphql language formatstatic String
printAstCompact
(Node node) This will print the Ast node in graphql language format in a compact manner, with no new lines and descriptions stripped out of the text.static void
printAstTo
(Node<?> node, Appendable appendable) This will pretty print the AST node in graphql language format to the given Appendable
-
Method Details
-
printAst
This will pretty print the AST node in graphql language format- Parameters:
node
- the AST node to print- Returns:
- the printed node in graphql language format
-
printAstTo
This will pretty print the AST node in graphql language format to the given Appendable- Parameters:
node
- the AST node to printappendable
- the Appendable to write the output to
-
printAst
This will pretty print the AST node in graphql language format- Parameters:
writer
- the place to put the outputnode
- the AST node to print
-
printAstCompact
This will print the Ast node in graphql language format in a compact manner, with no new lines and descriptions stripped out of the text.- Parameters:
node
- the AST node to print- Returns:
- the printed node in a compact graphql language format
-