Closed tim-field closed 7 years ago
Oh ok I guess its going to be something to do with Relay::cursorForObjectInConnection
:thinking: :hammer_and_wrench:
You would have to use the edge type of the connection as the field type of the mutation payload. We implemented that via #5, which makes it possible to create and reuse the edge type. Then you can simply create the edge value in your code and return it in the mutation. The cursor values depend on the pagination and cursor implementation of your data layer. You might be able to reuse the helper functions of this library.
Relay range add wants to have an edge as part of the payload.
I'm wondering how this feature could be implemented. I've tried to work out how other libraries are doing it, but I'm a little lost currently. Keen to hear what your think.