Fork me on GitHub
#pathom
<
2019-08-28
>
kenny00:08:42

Is there a way to customize when :com.wsscode.pathom.core/not-found shows up? For example, say I have an attribute :user/games which is cardinality many of maps. Each :game inside the list has a :game/type. My application want to pull all the :user/games, only pulling particular :game attributes depending on the :game/type, similar to what clojure.spec/multi-spec does. Is there a way to do this?

wilkerlucio11:08:01

about not-found, what people usually do is set a plugin to remove those from the output, they are internally useful to mark that something can't be realised and I decide to let if flow to the user, because its more information then nil or not having the key, but you can use the plugin: p/elide-special-outputs-plugin, this will remove not-found and reader-errors

wilkerlucio11:08:33

about the type thing, EQL handles that with Union Queries: https://edn-query-language.org/eql/1.0.0/specification.html#_unions

wilkerlucio11:08:52

ps: this is a bit outdated, was before connect, with connect the "branch" is usually decided by checking the presence of a key in the entity

kenny15:08:09

Oh cool! It sounds like I just need to structure the query correctly and Connect will figure it all out!

kenny15:08:46

The p/elide-not-found doc says: > Convert all ::p/not-found values of maps to nil It will actually remove ::p/not-found values, not set them to nil.

pserrano18:08:51

@wilkerlucio will there be a talk about pathom in clojure south? Are you going to be there?

wilkerlucio18:08:40

hello, I'll be at the event, but I have no talk in this one

wilkerlucio18:08:53

are you coming for the conference?

pserrano18:08:53

Sure. Me and @U2J4FRT2T are going to be there

4
pserrano18:08:28

We weren't brave enought to try talking about developing react native apps with fulcro + pathom hahahhaha

wilkerlucio21:08:21

lets all meet up there! 😄

pserrano11:08:41

We're already here hahaha

wilkerlucio21:08:46

just released Pathom 2.2.24, this release adds support for ::p/root-query @thenonameguy

🎉 16
thanks2 4
👍 4