nexus-plugin-prisma icon indicating copy to clipboard operation
nexus-plugin-prisma copied to clipboard

is Offset pagination supported?

Open kokokenada opened this issue 4 years ago • 4 comments

I was expecting to be able to use "Offset pagination" as described here: https://www.prisma.io/docs/reference/tools-and-interfaces/prisma-client/pagination

But I only see support for cursor based pagination. I am missing something?

kokokenada avatar Oct 20 '20 18:10 kokokenada

Use paginationStrategy: 'prisma':

nexusPrisma({
  paginationStrategy: 'prisma',
}),

P4sca1 avatar Oct 25 '20 19:10 P4sca1

thank @P4sca1 for your answer

//============= anyway, why this is not included in the doc? https://nexusjs.org/docs/plugins/prisma/overview#configuration

I was implementing the offset pagination my self until I see this post, what a relieve if this is included in the doc, it would save a lot people from the pain

tylim88 avatar Dec 03 '20 14:12 tylim88

@tylim88 I already opened an issue to address this but don't have the time to update the docs by myself. https://github.com/graphql-nexus/nexus-plugin-prisma/issues/901

P4sca1 avatar Dec 03 '20 14:12 P4sca1

thanks, solve my problem

menglingyu avatar Mar 08 '21 02:03 menglingyu