diff --git a/examples/usecase-relationship-union/schema.ts b/examples/usecase-relationship-union/schema.ts index eacf1877c93..ddade0ec27c 100644 --- a/examples/usecase-relationship-union/schema.ts +++ b/examples/usecase-relationship-union/schema.ts @@ -43,14 +43,16 @@ export const lists: Lists = { type: graphql.String, resolve: async (item, _, context) => { const { postId, linkId } = item; - if (postId) + if (postId) { return ( (await context.db.Post.findOne({ where: { id: postId } }))?.title ?? '[missing]' ); - if (linkId) + } + if (linkId) { return ( (await context.db.Link.findOne({ where: { id: linkId } }))?.title ?? '[missing]' ); + } return '?'; }, }),