Best Practices

Server-side data

Data returned from GraphQL APIs can be stored to prevent unnecessary round trips over the wire.  It is however important to keep your app in sync with what is returned when making GraphQL calls.  The index property on playback sources is a good example where you cannot predict the outcome.

For instance,  when you receive a track of index 4 within a source, and you call the previous mutation, you will not get index 3 back, but index 5.  The previous track will be returned as expected, but the index is used for the order in which tracks play. Other actions like skip, ads, etc will also affect the index property.