offset-based pagination in a field with a relation
Essentially, I have a schema with
updates ItemUpdate[], and I need to fetch its updates, but i want to paginate it. i know i can just do prisma.itemUpdates.fetchMany, but I want to be able to return a 404 when the item ID is not found - and it's possible for the item to exist without any updates - and i can't check that if i'm simply using a where { itemId } in an itemUpdates call
so, is this valid? ^^^0 Replies