Your intuition is correct. Those fields are redundant for the purpose of deleting node from data store, only config.deletedIDFieldName
is used during such operation (details in writeRelayUpdatePayload module).
However you can't leave other fields unfilled, because they are still required during validation of your mutation that extends RelayMutation
class. I have no idea where this inconsistency comes from, but it's worth noting that Relay team changed the direction of development and RelayMutation
will get deprecated.
RelayMutation
and fat/tracked queries. Future releases will deprecate
this API in favor of a static mutation API. We recommend using
RelayGraphQLMutation
to ease the transition to new mutations.
source: Related issue on github
After quick look in Relay's source it seems this transitional API does not use the old method of configs validation, but I haven't got a chance to experiment with it yet, so you can confirm it yourself.