Skip to content

Commit

Permalink
Make resolveType optional in types.union
Browse files Browse the repository at this point in the history
  • Loading branch information
emmatown committed Jun 7, 2021
1 parent cec49f0 commit d687c4a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 21 deletions.
5 changes: 5 additions & 0 deletions .changeset/heavy-chefs-warn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@ts-gql/schema": patch
---

`resolveType` in the arguments to `types.union` is now optional.
2 changes: 1 addition & 1 deletion packages/schema/src/output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export type UnionTypeFunc<Context> = <
name: string;
description?: string;
types: TObjectType[];
resolveType: (
resolveType?: (
type: TObjectType["__rootVal"],
context: Parameters<TObjectType["__context"]>[0],
info: GraphQLResolveInfo,
Expand Down
36 changes: 16 additions & 20 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit d687c4a

Please sign in to comment.