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

neither quickstart or getting started guide exmple source is working #2614

Closed
gogo-boot opened this issue Apr 10, 2023 · 3 comments
Closed

Comments

@gogo-boot
Copy link

gogo-boot commented Apr 10, 2023

What happened?

It's my first time to use gqlgen.

Following Quickstart Guide

/example ❯ go run server.go                                                                                                                   
# github.com/hashicorp/golang-lru/v2/simplelru
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:8:12: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:8:14: predeclared comparable requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:8:28: predeclared any requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:14:19: type instantiation requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:36:14: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:50:14: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/lru.go:8:20: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/lru.go:11:10: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/lru.go:19:13: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/lru_interface.go:5:15: type parameter requires go1.18 or later (-lang was set to go1.16; check go.mod)
../../../go/1.20.1/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:14:19: too many errors

I tried the getting started guide and cloned the https://github.com/vektah/gqlgen-tutorials Repo.
Following Getting started guide

gqlgen-tutorials/gettingstarted master !2 ❯ go run server.go                                                                                                                                              ✘ INT 16:09:59
go: github.com/99designs/gqlgen@v0.17.28 (replaced by ../../../99designs/gqlgen): reading ../../../99designs/gqlgen/go.mod: open /Users/jinwoowang/Project/99designs/gqlgen/go.mod: no such file or directory
go: github.com/99designs/gqlgen@v0.17.28 (replaced by ../../../99designs/gqlgen): reading ../../../99designs/gqlgen/go.mod: open /Users/jinwoowang/Project/99designs/gqlgen/go.mod: no such file or directory

My go version

example ❯ go version                                                                                                                            
go version go1.20.1 darwin/amd64

What did you expect?

it runs.

@gogo-boot gogo-boot changed the title getting started guide exmple source is not working neither quickstart or getting started guide exmple source is working Apr 11, 2023
@mathieu-chauvet
Copy link

Same problem here, tried with 1.20.3, 1.19.1 and 1.18.4

@mathieu-chauvet
Copy link

mathieu-chauvet commented Apr 11, 2023

This is actually explained in #2576
go mod tidy should be executed again after init

@gogo-boot
Copy link
Author

This is actually explained in #2576 go mod tidy should be executed again after init

it works. thank you

UnAfraid added a commit to UnAfraid/gqlgen that referenced this issue Jul 19, 2023
Added `go mod tidy` in quick start guide to address issues like 99designs#2717, 99designs#2651, 99designs#2641, 99designs#2614 and 99designs#2576
UnAfraid added a commit to UnAfraid/gqlgen that referenced this issue Jul 19, 2023
Added `go mod tidy` in quick start guide to address issues like 99designs#2717, 99designs#2651, 99designs#2641, 99designs#2614 and 99designs#2576
UnAfraid added a commit to UnAfraid/gqlgen that referenced this issue Jul 19, 2023
Added `go mod tidy` in quick start guide to address issues like 99designs#2717, 99designs#2651, 99designs#2641, 99designs#2614 and 99designs#2576
StevenACoffman pushed a commit that referenced this issue Jul 19, 2023
Added `go mod tidy` in quick start guide to address issues like #2717, #2651, #2641, #2614 and #2576
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants