Federation: Entity type is not shareable / Resolver generated for non-resolvable @key
- 主要语言
- Go
- 星标
- 10.8k
- 派生
- 1.3k
- 平均合并
- 2 天 36 分钟
- 30 天内合并 PR
- 26
描述
When defining two subgraphs implementing the same @key directive on the same type:
type SomeEntity @key(fields: "id", resolvable: false) {
id: ID!
}
registering the generated schema in apollographql results in an error message:
UNKNOWN: Non-shareable field "Entity.findSomeEntityByID" is resolved from multiple subgraphs: it is resolved from subgraphs "schema1" and "schema2" and defined as non-shareable in all of them
There are two issues with this:
1. Since resolvable is false, no resolver should be generated
2. If a resolver is generated, it probably should be marked shareable (in https://github.com/99designs/gqlgen/blob/master/plugin/federation/federation.go#L166 )
- `go run github.com/99designs/gqlgen version`?
v0.17.4
- `go version`?
go version go1.19 darwin/arm64
贡献指南
评估
这个 Issue 还没有评估数据。