Open solussd opened 7 years ago
This is done on purpose. Your response can have the result of multiple mutations, it's your job to lift the tempids key one level higher on the server.
I'm not sure I understand–
the response has the form:
{some/action {:result {:tempids ...}}}
Each action could potentially have its own result and own tempids map. If I moved the :tempids map-entry up to the same level as result, how does that relate to multiple mutations?
I mean you're responsible to pull all the tempids to the toplevel of the response and merge them together.
default-merge
doesn't look at the top level. It looks at the keyval for each action.
Ooops, I guess I had a wrong assumption. I don't know why it's done that way then, but I vaguely remember some discussion on Slack about this.
default-merge
doesn't look in the:results
map of a mutation response for a`:tempids
key (instead looks one level higher).