Fork me on GitHub

@codonnell hello, no worries, about 1, I guess that would be ok, but doesn't munging only goes on keys?


2. I don't remember why is that, maybe just missed, can't think of a case to need to keep as uuids

Chris O’Donnell11:06:36

Perhaps I miscommunicated 1. The reason I'd like to see tempid? passed through there in addition to demung is so tempid? isn't defaulted to (constantly false) when connect builds graphql queries. I couldn't find a way to pass that predicate in, but that could be my unfamiliarity. Wasn't sure what that had to do munging only going on keys, so trying to clarify.


oh, I see, I think its makes sense to forward it down


otherwise, as you found, you can't set it


@codonnell if you wanna send those changes I would be glad to merge it in

Chris O’Donnell12:06:06

Will do, thanks for your time.


Why ::pc/batch? dont always receive/return "many" ?


@souenzzo thats for interface/api compatibility, but if you want that pathom has some helpers for you 🙂 you can use the ::pc/transform in combination with pc/transform-batch-resolver to receive consistent input, example:

👍 4

(pc/defresolver batch-sample [env input]
  {::pc/input     #{:some/id}
   ::pc/output    [:some/output]
   ::pc/transform pc/transform-batch-resolver}
  ; input will always be a sequence now, also note ::pc/batch? true will be automatically
  ; add by the pc/transform-batch-resolver helper


is metadata on data from a resolver preserved as a parse result is built up? running into this weird case using the parallel parser where some data returned from a root resolver has metadata attached to it. when I actually pull the parse result off the chan returned by the parse call, it doesn’t contain that metadata. kind of at a loss here, and maybe I’m missing something about how core.async preserves/doesn’t preserve metadata under the hood


@mss, currently there is no assumption on the preservation of the data, there are multiple layers of caching and merging happens in multiple times (specially in the parallel parser), so there is a good chance some meta data is been lost in the process, can you tell me more about what is the use case you have for the metadata? maybe we can find a way around it


I’m using ring cookie middleware and depending on the mutation/resolver want to drop a cookie by including a :cookie key in a resolver/mutation result. pathom doesn’t preserve that out of band data if I just include it afaict


So similar to fulcro’s impmementation, I was attempting to add metadata with a response transformation fn onto the result with the data to add to the ring response, parse that result later and feed the raw ring response into the transformation fn


If you have a better idea for how to accomplish including out of band data with a parse result from inside of a resolver I’m all ears


Here’s the fulcro implementation as a reference FWIW. What I’m doing looks pretty similar


My inclination is to just put an atom in the env and swap in data in my resolvers that needs to be merged into the response. Deref it post parse and build the complete response

Chris O’Donnell22:06:33

@wilkerlucio PR with uuid and tempid changes at (Is pinging you here about PRs actually helpful or just extra noise?)


@mss doing the atom approach is totally fine, I do that for a lot of things, including the built-in error system 🙂

👍 4

you can use the fn env version to always inject a new one, or write a plugin


Appreciate the feedback. Really a lovely library to use, thanks for all the work you put in

🙏 4

thinking a bit about it, in your case, the caller to the parser can send the atom as part of the env, so you have external control over it