99designs / 99designs/gqlgen

Federation: Entity type is not shareable / Resolver generated for non-resolvable @key

Đang mở
#2,387 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
10.8k
Fork
1.3k
Merge trung bình
2 ngày 36 phút
Pull request đã merge (30 ngày)
26

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.