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
returnnil, fmt.Errorf("%s was not found", schemaType.Name())
}
The reason Query cannot be found in b.cfg.Models is likely because it is being excluded as shown below.
However, simply modifying this code to not exclude Query will result in many errors.
go run github.com/99designs/gqlgen version v0.17.36
go version go version go1.21.0 darwin/arm64
The text was updated successfully, but these errors were encountered:
sonatard
changed the title
Returning a Query in the Payload of a Mutation can result in an error.
Returning a Query in the Payload of a Mutation got some errors
Aug 21, 2023
What happened?
The error occurs because after executing the
bindField
function, in the case of a Query,f.TypeReference
becomesnil
.gqlgen/codegen/field.go
Lines 69 to 75 in d6270e4
The reason f.TypeReference becomes nil is because Query cannot be found in b.cfg.Models.
gqlgen/codegen/config/binder.go
Lines 381 to 383 in d6270e4
The reason Query cannot be found in b.cfg.Models is likely because it is being excluded as shown below.
However, simply modifying this code to not exclude Query will result in many errors.
gqlgen/plugin/modelgen/models.go
Lines 135 to 137 in d6270e4
What did you expect?
generate success.
versions
go run github.com/99designs/gqlgen version
v0.17.36go version
go version go1.21.0 darwin/arm64The text was updated successfully, but these errors were encountered: