title: How to manage cursors and sorting in Relay?
body: <p>We have a graphql server (not written in javascript) serving a paginated list of objects. We're trying to conform to the relay specification, but we've hit an interesting case that could use clarification.</p>
  
  <p>Specifically: are cursors allowed to depend on other inputs to the connection? Similar to <a href="https://github.com/graphql/graphql-relay-js/issues/20" rel="noreferrer">https://github.com/graphql/graphql-relay-js/issues/20</a>, our connection takes a sort_key argument that determines the sort order of the returned list. Depending on the specified sort order, the edge for an object may return different cursor values (since the server needs different information in each case to determine the next object). However, a careful reading of <a href="https://facebook.github.io/relay/docs/guides-mutations.html#range-add" rel="noreferrer">https://facebook.github.io/relay/docs/guides-mutations.html#range-add</a> suggests this is not permitted; mutations that return a newly created edge must return a single cursor that can be universally applied to all possible lists in which that edge may appear? How does facebook solve this problem?</p>