Is it possible to use graphql connections for pagination with cursor, hasNextPage properties available? Does anyone have any experience using this?
Have you looked into the Graphcool Relay API? It implements the Relay Cursor Connections Specification, which sounds exactly what you need.
I am sorry but I feel like you didn’t answer the question. I have
count. I believe that is not enough. Meta resolver should also return whether I can or can’t query next page. Calculating this information client-side is not a good practice.
EDIT: Now I understand your answer. The answer should be more like:
No you can't do that. You have to get the pagination information yourself.
Although most people will use
first parameters in normal
I disagree. The question was specifically about
hasNextPage and more according to the Relay Cursor Connections specification I shared above.
The Graphcool Relay API exposes Relay-style connections.
In Prisma, there is one API that both exposes simple-style
first fields, but also Relay-style connection fields, with the caveat that inner connection fields are added soon.