title: Pagination with graphql and django
body: <p>I am using react(fe), Django (be) and graphql. Currently I send request when I reach bottom of my page to fetch more &quot;posts&quot; to my infinite scrolling feed.</p>
  <p>In django-graphene, this would work like
  Return <code>Post.objects.all() [offset, offset+limit]</code>. But what should I do if for example, my return statement weren't as easy as just fetching all posts? What if I need to return the posts in a sorted way that they aren't already in the DB? Right now, I am doing it like
  Return <code>custom_sort(Post.objects.all())[offset, offset+limit]</code>. Still working, but I need to sort them on every request (I think, if Django isn't cashing it). How would one do this so I only need to sort them once, and then save those values for say a minute so I don't need to sort them every time I request?</p>