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
Yes, the cursor should contain enough information in it to enable fetching the next page from that point onwards (including constraints such as sorting and filtering), but whether/how you do this is up to you as it is implementation-specific.
As for mutations, in your getConfigs()
implementation you can specify rangeBehaviors
on a per-call basis. So, if you have a sorted view, you might choose to append or prepend depending on the sort order. This behavior specifies what Relay will do on the client-side to update its store. It's still your responsibility to ensure that the code your GraphQL server receives all the information it needs (via input variables) to correctly perform the actual mutation.