graphql / graphql/graphql.github.io
documentation should include `__resolveType` requirement for Union Type to return interface
- 主要语言
- TypeScript
- 星标
- 889
- 派生
- 1.5k
- 平均合并
- 4 天 12 小时
- 30 天内合并 PR
- 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.
贡献指南
调研方向
首先在 GraphQL 文档中找到 Union Types 部分,并将其中的指导与 Apollo 链接的 Unions and interfaces 示例进行比较。当文档解释 Union resolver 对 __resolveType 的要求,并展示或链接到一个有帮助的示例时,即可完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- graphql
- 领域
- documentation
- Issue 类型
- 文档
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100