You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My project just did a library upgrade. The gqlgen's version upgrade from 0.13.0 -> 0.17.49, after upgrade I found some errors comes from graphql genrated.go. The error looks like this
../../graph/generated/generated.go:3734:2: not enough arguments in call to out.Dispatch
have ()
want (context.Context)
Then I tried to regenerate all related files. But the gqlgen give me this error
gqlgen.yml already exists
exit status 1
When I change the command from init to generate, there is new error generating core failed: unable to load $SOMEPATH/graph/model - make sure you're using an import path to a package that exists
I'm not sure if I should update the path itself or something else?
What did you expect?
The tool can generate right go files for graphql
Minimal graphql.schema and models to reproduce
"The `Status` type, represent job execution status"
type Status {
"Job running user"
user: String!
.....
}
versions
go run github.com/99designs/gqlgen version? 0.17.49
go version? go1.22.4
The text was updated successfully, but these errors were encountered:
@wzf1943 Hi, I encountered the same errors and I came across this issue, but I resolved it, so I'll suggest the possible cause of the problem.
I think you might have a miss match of generator version and version of the package that your application depends on in go.mod.
While your application depends on 0.17.49 that expects out.Dispatch has ctx argument, your generator binary may be older version that generates out.Dispatch() instead of out.Dispatch(ctx).
So make sure you are using the same version of generator between go.mod and generator binary.
What happened?
My project just did a library upgrade. The gqlgen's version upgrade from 0.13.0 -> 0.17.49, after upgrade I found some errors comes from graphql genrated.go. The error looks like this
Then I tried to regenerate all related files. But the gqlgen give me this error
When I change the command from init to generate, there is new error
generating core failed: unable to load $SOMEPATH/graph/model - make sure you're using an import path to a package that exists
I'm not sure if I should update the path itself or something else?
What did you expect?
The tool can generate right go files for graphql
Minimal graphql.schema and models to reproduce
versions
go run github.com/99designs/gqlgen version
? 0.17.49go version
? go1.22.4The text was updated successfully, but these errors were encountered: