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

All your examples not working!! #2651

Closed
kamalkech opened this issue May 29, 2023 · 3 comments
Closed

All your examples not working!! #2651

kamalkech opened this issue May 29, 2023 · 3 comments

Comments

@kamalkech
Copy link

kamalkech commented May 29, 2023

why all examples in repo not working
then i follow your documentation in official site not working too, getting many errors

image

@UnAfraid
Copy link
Contributor

UnAfraid commented May 30, 2023

Run go mod tidy then go run server.go

@kamalkech
Copy link
Author

@UnAfraid i am not stupid to not do that, any way for my project i switch from go to other language programming because golang community very weak

@UnAfraid
Copy link
Contributor

UnAfraid commented Jun 4, 2023

@kamalkech i reproduced your issue and shown you how to fix it, anyway good luck.

❯ mkdir example
cd example
go mod init example

go: creating new go.mod: module example
❯ printf '// +build tools\npackage tools\nimport (_ "github.com/99designs/gqlgen"\n _ "github.com/99designs/gqlgen/graphql/introspection")' | gofmt > tools.go

go mod tidy

go: finding module for package github.com/99designs/gqlgen/graphql/introspection
go: finding module for package github.com/99designs/gqlgen
go: found github.com/99designs/gqlgen in github.com/99designs/gqlgen v0.17.31
go: found github.com/99designs/gqlgen/graphql/introspection in github.com/99designs/gqlgen v0.17.31
❯ go run github.com/99designs/gqlgen init

Creating gqlgen.yml
Creating graph/schema.graphqls
Creating server.go
Generating...

Exec "go run ./server.go" to start GraphQL server
❯ go run server.go

# github.com/hashicorp/golang-lru/v2/simplelru
../../../../go/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/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/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/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/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/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/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/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/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/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/pkg/mod/github.com/hashicorp/golang-lru/v2@v2.0.1/simplelru/list.go:14:19: too many errors
❯ go mod tidy
❯ go run server.go

2023/06/04 21:13:45 connect to http://localhost:8080/ for GraphQL playground

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

3 participants