Open unp opened 7 years ago
add @connection to all nested connections in mutation output payload
and also update them using updater
function
add @connection to all nested connections in mutation output payload
and also update them using
updater
function
can you show a sample? having a hard time with this. would really appreciate
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I have a mutation that stores contact information. It has top-level fields like
first_name
,last_name
, and it also has nested connections, likeuser_contact_phones
anduser_contact_emails
.The issue is that, while server responds with all nested connections as expected, the client store only updates with the fields in the top-level connection. Any idea why this is happening?
I have tried adding the new edge three different ways:
ConnectionHandler
'sinsertEdgeAfter
RelayRecordProxy
'ssetLinkedRecord
RANGE_ADD
configEach of them properly adds the new edge, but
user_contact_addresses
,user_contact_phones
, anduser_contact_emails
fields get passed into the component's props asundefined
.When I debug with the
RelayRecordProxy
in the console (inside myupdater
function, I am able to access the nested records.Here are the relevant parts of my code:
This is what gets passed into the props when the component updates: