Hello folks, Any guides on how I can filter unique...
# orm-help
c
Hello folks, Any guides on how I can filter unique entries on a collection? i.e. I have a UserHistory which has User and Article Fields inside.
Copy code
graphql
type ReadHistory {
    id: ID! @unique
    user: User!
    article: Article!
}
I need unique user id and article id pairs on that. What I currently have is
Copy code
context.prisma.readHistories({
        where: {
          user: { id: args.userId },
          article: { authors_some: { isPOC: true } }
        },
        orderBy: 'createdAt_DESC'
      })