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
When extending a federated entity with a field of the array type containing object (not primitives/scalars) and adding a field that requires the array field, gqlgen generate generates invalid code. It looks like the execution context does not have any unmarshaler for the specific type. I'm not sure if this kind of relation is valid in GraphQL or if it's missing in gqlgen.
What did you expect?
When extending a federated entity with a field of the array type containing object (not primitives/scalars) and adding a field that requires the array field, gqlgen generate generates valid code.
gofmt failed on federation.go: /Users/arne/dev/orgs/gameflow/backend/graph-template-go/graph/generated/federation.go:105:33: expected ')', found ',' (and 1 more errors)
validation failed: packages.Load: /Users/arne/dev/orgs/gameflow/backend/graph-template-go/graph/generated/federation.go:105:33: expected ')', found ','
/Users/arne/dev/orgs/gameflow/backend/graph-template-go/graph/generated/federation.go:105:35: expected ';', found rep
/Users/arne/dev/orgs/gameflow/backend/graph-template-go/graph/generated/federation.go:105:26: invalid operation: ec (variable of type *executionContext) is not an interface
Invalid code
entity.Arr, err=ec.(ctx, rep["arr"])
versions
gqlgen version? v0.14.0-dev
go version? go version go1.17.6 darwin/arm64
dep or go modules ? modules
The text was updated successfully, but these errors were encountered:
What happened?
When extending a federated entity with a field of the array type containing object (not primitives/scalars) and adding a field that requires the array field,
gqlgen generate
generates invalid code. It looks like the execution context does not have any unmarshaler for the specific type. I'm not sure if this kind of relation is valid in GraphQL or if it's missing in gqlgen.What did you expect?
When extending a federated entity with a field of the array type containing object (not primitives/scalars) and adding a field that requires the array field,
gqlgen generate
generates valid code.Minimal graphql.schema and models to reproduce
Logs
Invalid code
versions
gqlgen version
? v0.14.0-devgo version
? go version go1.17.6 darwin/arm64The text was updated successfully, but these errors were encountered: