graphql / graphql/graphql.github.io

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

Offen
#474 0 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
✏️ Editorial
Vorherrschende Sprache
TypeScript
Sterne
889
Forks
1.5k
Ø Merge
4 T. 12 Std.
Gemergte PRs (30 T.)
21

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.