Fork me on GitHub

@eoliphant its an interesting approach, and you are right to be concerned about the consistency across mutations and reads, at this moment pathom doesn't have an answer for this case, specially on the parallel parser since each root entry goes in parallel. that said I still need to see that happening, mutation responses are a much better place to request follow up info then follow-up reads, and if we consider that it might not be a problem, also, if multiple mutations need to coordinate, better transform then in a single mutation where you are free to coordinate as you need. so as I see we have ways around it as it is, the library could improve to have better support for it, but so far it seems to not be needed, makes sense?


Hey @wilkerlucio, thanks for the confirmation re: my concerns. But I didn’t quite understand the > mutation responses are a much better place to request follow up info then follow-up reads by mutation response, did you mean a second ‘request’ based on the response from the first?

(parser {} [{(add-foo ..) [:foo/id]}])
(parser {} [{[:foo/id ...] [:foo/bar :foo/baz]}])
; - instead of 
(parser {} [{{(add-foo ..)[:foo/bar :foo/baz]}])


also shot you a quick doc pr


@eoliphant both

;; 1
[{(add-value) [:app/value]}]
;; 2
Are valid and will work But in 1 you say "do the mutation then do the query" In 2 you can "do the mutation and give me this query" In a parallel parser, 2 can query first and then do the mutation


gotcha, so in my scenario though, I guess 2 is what I don’t want because I want the :app/value after the add-value?


@eoliphant I edited and corrected a detail in the query (removed [] from 2 ). No! 1 will always call :app/value after (add-value) 2 possibly call :app/value before/at the same time.


right right, I get that, so in most cases for me I need to use the join syntax, because I again, want to query against the thing the mutation just created/updated/etc

👍 5

#fulcro also has the "mutation-merge", that you can use to merge your mutation results.


ah sweet,I’d seen that haven’t used it though


@eoliphant I suggest you check then out, they are quite cool, and pathom deals nicely with then as well, in pathom case it uses the response data from the mutation as initial context, and you can query anything on top of it (as long as the mutation response has enough data to figure the rest)