graphql / graphql/graphql.github.io

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

オープン
#474 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る
✏️ Editorial
主要言語
TypeScript
スター
889
フォーク
1.5k
平均マージ
4日 12時間
マージ済み PR(30日)
21

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。