We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check out the following snippet: https://go.dev/play/p/FkEAZlnbd-E
The indentation is set to a single tab ("\t"), however, the printed output uses two tabs for indentation. Only one is expected.
"\t"
package main import ( "fmt" "os" "github.com/wundergraph/graphql-go-tools/pkg/ast" "github.com/wundergraph/graphql-go-tools/pkg/astparser" "github.com/wundergraph/graphql-go-tools/pkg/astprinter" "github.com/wundergraph/graphql-go-tools/pkg/operationreport" ) const graph = ` { foo bar(id: "123") } ` func main() { parser := astparser.NewParser() doc := ast.NewDocument() doc.Input.ResetInputBytes([]byte(graph)) report := operationreport.Report{} parser.Parse(doc, &report) if report.HasErrors() { fmt.Println(report.Error()) return } if err := astprinter.PrintIndent(doc, doc, []byte("\t"), os.Stdout); err != nil { fmt.Println(err) } fmt.Println() }
Output:
{ foo bar(id: "123") }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Check out the following snippet: https://go.dev/play/p/FkEAZlnbd-E
The indentation is set to a single tab (
"\t"
), however, the printed output uses two tabs for indentation. Only one is expected.Output:
The text was updated successfully, but these errors were encountered: