Package graphql.language
Class AstPrinter
- java.lang.Object
-
- graphql.language.AstPrinter
-
- Direct Known Subclasses:
PrettyAstPrinter
@PublicApi public class AstPrinter extends java.lang.Object
This can take graphql language AST and print it out as a string
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
printAst(Node node)
This will pretty print the AST node in graphql language formatstatic void
printAst(java.io.Writer writer, Node node)
This will pretty print the AST node in graphql language formatstatic java.lang.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.
-
-
-
Method Detail
-
printAst
public static java.lang.String printAst(Node node)
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
-
printAst
public static void printAst(java.io.Writer writer, Node node)
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
public static java.lang.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.- Parameters:
node
- the AST node to print- Returns:
- the printed node in a compact graphql language format
-
-