Skip to content

Commit

Permalink
add search in posts, categories and subcategories
Browse files Browse the repository at this point in the history
I must added normalizeTitle as Prisma cannot perform case insensitive search.
Source: prisma/prisma#3611
  • Loading branch information
Petr Brzek authored and Petr Brzek committed Apr 14, 2019
1 parent 69b991e commit 7452aac
Show file tree
Hide file tree
Showing 13 changed files with 724 additions and 229 deletions.
4 changes: 3 additions & 1 deletion database/datamodel.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ type Post {
createdAt: DateTime!
updatedAt: DateTime!
isPublished: Boolean! @default(value: "false")
slug: String @unique
title: String! @unique
normalizeTitle: String! @unique
text: String!
author: User!
votes: [Vote!]!
Expand All @@ -17,6 +17,7 @@ type Category {
createdAt: DateTime!
updatedAt: DateTime!
title: String! @unique
normalizeTitle: String! @unique
subCategories: [SubCategory!]!
}

Expand All @@ -25,6 +26,7 @@ type SubCategory {
createdAt: DateTime!
updatedAt: DateTime!
title: String! @unique
normalizeTitle: String! @unique
categories: [Category!]!
posts: [Post!]!
}
Expand Down
Loading

0 comments on commit 7452aac

Please sign in to comment.