Skip to content

Commit f1f2fa7

Browse files
committed
fix: update search query to use OR instead of AND
1 parent 7522941 commit f1f2fa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/graphql/resolvers/Book.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export const BookResolvers = {
2323
}
2424

2525
if (args.author) {
26-
queryBuilder.andWhere("LOWER(book.author) LIKE :author", {
26+
queryBuilder.orWhere("LOWER(book.author) LIKE :author", {
2727
author: `%${args.author.toLowerCase()}%`,
2828
});
2929
}

0 commit comments

Comments
 (0)