Documentation ¶
Overview ¶
Package astprinter takes a GraphQL document and prints it as a String with optional indentation.
Index ¶
- func Print(document, definition *ast.Document, out io.Writer) error
- func PrintIndent(document, definition *ast.Document, indent []byte, out io.Writer) error
- func PrintString(document, definition *ast.Document) (string, error)
- func PrintStringIndent(document, definition *ast.Document, indent string) (string, error)
- type Printer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Print ¶
Print takes a document as well as a definition (optional) and prints it to the io.Writer. The definition is only necessary in case a GraphQL Operation should be printed.
func PrintIndent ¶
PrintIndent is the same as Print but accepts an additional indent parameter to set indentation.
func PrintString ¶
PrintString is the same as Print but returns a string instead of writing to an io.Writer
Types ¶
Click to show internal directories.
Click to hide internal directories.