This is a bit of a hack, because it's hard to calculate hasNextPage in pure AQL. Instead, I'm adding 1 to the number of results, then slicing the result set back down before returning it. If the result set is equal to first + 1, we have a next page.
This query can be run on the example "Social" graph. Try adjusting the first value to 1 to see pagination. Set after to the cursor of the previous result to go to the next page.