Skip to content

Commit

Permalink
fix eslint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
dcousens committed Sep 26, 2023
1 parent e2764a9 commit 937d413
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions examples/usecase-relationship-union/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 '?';
},
}),
Expand Down

0 comments on commit 937d413

Please sign in to comment.