graphql / graphql/graphql.github.io

documentation should include `__resolveType` requirement for Union Type to return interface

Đang mở
#474 0 bình luận 1 reaction 0 người được giao Xem trên GitHub
✏️ Editorial
Ngôn ngữ chính
TypeScript
Star
889
Fork
1.5k
Merge trung bình
4 ngày 12 giờ
Pull request đã merge (30 ngày)
21

Mô tả

There's no mention in the documentation that Union Types require a `__resolveType` field in the Resolver for the Union.

a good example of helpful information can be found at [Apollo's Documentation](https://www.apollographql.com/docs/graphql-tools/resolvers.html#Unions-and-interfaces)

> When you have a field in your schema that returns a union or interface type, you will need to specify an extra __resolveType field in your resolver map, which tells the GraphQL executor which type the result is, out of the available options.

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.