Skip to content

Commit e37905f

Browse files
Merge pull request #1665 from bot101/patch-1
Update unions.md - Added information that let's the user know to import the resolver in a schema-first approach
2 parents 22903d0 + 8825ce2 commit e37905f

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. Also, note that the `ResultUnionResolver` class has to be registered as a provider in any module. Let's create a `ResultUnionResolver` class and define the `__resolveType` method.
118118
119119
```typescript
120120
@Resolver('ResultUnion')

0 commit comments

Comments
 (0)