Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Relay edge cursors easily readable using wrapper objects.
Since relayStylePagination edges could be Reference objects, we either need to read their properties using options.readField (like we do for edge.node in the read function), or keep track of those properties separately in the internal representation of the field. This second strategy turns out to be more convenient because the merge function sometimes needs to update the cursor associated with an edge using information from pageInfo. Modifying other parts of the cache while you're merging a field can be awkward, so it's simpler and cleaner to update the cursor property of a wrapper object.
- Loading branch information