Skip to content

Commit f6abe64

Browse files
author
Ikenna Okafor
authored
Update unions.md
Not having that last bit of information had me running in circles for 2+ days, and there's nowhere you'll find that information on Google.
1 parent d6456e2 commit f6abe64

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

content/graphql/unions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ export class Book {
114114
export type ResultUnion = Author | Book;
115115
```
116116
117-
Unions require an extra `__resolveType` field in the resolver map to determine which type the union should resolve to. Let's create a `ResultUnionResolver` class and define the `__resolveType` method:
117+
Unions require an extra `__resolveType` field in the resolver map to determine which type the union should resolve to. Let's create a `ResultUnionResolver` class and define the `__resolveType` method. Note that the `ResultUnionResolver` class has to be registered in the required module:
118118
119119
```typescript
120120
@Resolver('ResultUnion')

0 commit comments

Comments
 (0)