Fork me on GitHub

Is there some config I need to set up for a defmutation for its output? If my mutation errors, I want to return a map with the keys :server/error and :server/message but by the time pathom's response gets to ring I see that the map is empty. do keys in mutation return values get trimmed somehow?


OK, so I was triggering the mutation using uism/trigger-remote-mutation with the ::m/returning option set--getting rid of ::m/returning resolved this issue for me. still surprised this happened, though, since as far as i can tell using the ::m/returning option didn't change the tx being sent over the wire to pathom


hello, when you use returning Fulcro does change the query it sends to Pathom, it adds a join on the mutation call, so you get the data, I believe the problem you are having is that, because you have a join query on the mutation, that join query may not have the ::server/error keys, so pathom will strip those out of the response (because the request didn't mentioned it)


the simplest fix is to add those keys to the component you are using the returning with


or add a config to pathom to always spit out those keys using mutation join globals:


makes sense, thank you!