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 PrintIndentDebug(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)
- func PrintStringIndentDebug(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 PrintIndentDebug ¶
func PrintString ¶
PrintString is the same as Print but returns a string instead of writing to an io.Writer
func PrintStringIndent ¶
PrintStringIndent is the same as PrintIndent but returns a string instead of writing to an io.Writer
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
Printer walks a GraphQL document and prints it as a string
func NewPrinter ¶
Click to show internal directories.
Click to hide internal directories.