I'm trying to do the same thing Next.js, took a guess at it, but after doesn't seem to be doing much - im getting the same project back for next as I am for the main page.
The after param tells the API to return all documents after a given document, specified by its ID, not by UID.
Prismic doesn't have limit params. You need to set the page property to define what page of the API results to return, starting with and defaulting to 1.
Specify the orderings params field with the path my.[custom-type].[field].
So, with the above params option, your query should look like this:
But the other problem I ran into is that on the last project, nothing is returned. I guess I could also come up with a function to get the first project to loop back to, but for now (since the site will likely never have more than 6-10 projects), im just passing all the projects and getting next by index.