Skip to content
New issue

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

Tutorial doesn't compile on latest #887

Open
mattjohnsonpint opened this issue Sep 12, 2024 · 0 comments
Open

Tutorial doesn't compile on latest #887

mattjohnsonpint opened this issue Sep 12, 2024 · 0 comments
Labels
internally-reviewed Internally reviewed

Comments

@mattjohnsonpint
Copy link
Contributor

mattjohnsonpint commented Sep 12, 2024

No rush, but thought I'd point out that the tutorial in the readme doesn't work:

https://github.com/wundergraph/graphql-go-tools/blob/master/README.md#tutorial

The APIs have changed since it was originally created.

go build . gives:

./main.go:43:38: too many arguments in call to printer.Print
        have (*ast.Document, nil, *bytes.Buffer)
        want (*ast.Document, io.Writer)
./main.go:80:38: too many arguments in call to printer.Print
        have (*ast.Document, nil, *bytes.Buffer)
        want (*ast.Document, io.Writer)
./main.go:114:58: too many arguments in call to astprinter.PrintStringIndent
        have (*ast.Document, nil, string)
        want (*ast.Document, string)
./main.go:274:58: too many arguments in call to astprinter.PrintStringIndent
        have (*ast.Document, nil, string)
        want (*ast.Document, string)
./main.go:333:58: too many arguments in call to printer.Print
        have (*ast.Document, *ast.Document, *xxhash.Digest)
        want (*ast.Document, io.Writer)
./main.go:400:58: too many arguments in call to printer.Print
        have (*ast.Document, *ast.Document, *xxhash.Digest)
        want (*ast.Document, io.Writer)
./main.go:472:3: unknown field IncludeInfo in struct literal of type plan.Configuration
./main.go:480:13: assignment mismatch: 1 variable but plan.NewPlanner returns 2 values
./main.go:480:51: too many arguments in call to plan.NewPlanner
        have (context.Context, plan.Configuration)
        want (plan.Configuration)
./main.go:495:48: cannot use true (untyped bool constant) as resolve.ResolverOptions value in argument to resolve.New
./main.go:495:48: too many errors

Also there seem to be several items that have simplified in approach since the tutorial was written. Might be good to show the simplified APIs.

@jensneuse jensneuse added the internally-reviewed Internally reviewed label Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internally-reviewed Internally reviewed
Projects
None yet
Development

No branches or pull requests

2 participants