Cursor/Iterator

prisma

#1

Hi,

Is there a cursor/iterator concept in Prisma? Something that would allow me to make an efficient iteration through several records of several pages of a query result, possibly mutating the records on the go?

Thanks
Marco


#2

You might be interested in Relay style cursors:

https://facebook.github.io/relay/graphql/connections.htm

The top-level fields in Prisma are Relay-compliant, inner connections are on their way: https://github.com/graphcool/prisma/issues/1780


#3

Thanks nilan. I though the Connection idea is to traverse the graph of relations in the database, as oposed to traversing the data itself. I will have a look at those links.