graphql / graphql/graphql.github.io

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

Ouverte
#474 0 commentaires 1 réaction 0 personnes assignées Voir sur GitHub
✏️ Editorial
Langage dominant
TypeScript
Étoiles
889
Forks
1.5k
Merge moyen
4 j 12 h
PR mergées (30 j)
21

Description

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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.