This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-11-23
Channels
- # aws (3)
- # babashka (17)
- # beginners (44)
- # boot (1)
- # bristol-clojurians (1)
- # cider (19)
- # clj-kondo (7)
- # cljfx (5)
- # clojure (35)
- # clojure-australia (25)
- # clojure-europe (41)
- # clojure-nl (4)
- # clojure-spec (5)
- # clojure-uk (104)
- # clojuredesign-podcast (1)
- # clojurescript (41)
- # component (6)
- # conjure (5)
- # core-async (20)
- # core-logic (5)
- # cryogen (7)
- # cursive (4)
- # data-science (1)
- # datomic (14)
- # devcards (2)
- # events (1)
- # fulcro (6)
- # helix (6)
- # jobs (4)
- # kaocha (4)
- # lambdaisland (4)
- # leiningen (3)
- # luminus (1)
- # malli (2)
- # meander (2)
- # mount (6)
- # off-topic (2)
- # pedestal (25)
- # rdf (1)
- # re-frame (17)
- # reagent (5)
- # releases (1)
- # reveal (13)
- # rewrite-clj (45)
- # shadow-cljs (27)
- # sql (18)
- # tools-deps (93)
- # vim (13)
- # xtdb (11)
I just started to finally take a deeper dive into crux and it's been great so far. I'm coming from datahike + fulcro/pathom, and the eql/project
that crux now offers makes it so I don't even need to write (much) pathom resolver code, great. But one thing that is a little annoying is that the eql/project
returns an empty map when an attribute is not found, that makes it so pathom thinks that it's found and the follow on reads won't happen. Is there a flag I could set to have that not happen? I realize this is an alpha feature, and I can walk the crux query result to remove empty attributes as a workaround.
Hi - thanks for the feedback! It's always great to know whether people are finding the various features useful, but a suggestion for improvement is even better 🙏
We have some in-flight work happening on eql/project
at the moment: https://github.com/juxt/crux/issues/1220
...in that list is the ability to set a :default
value, which is somewhat similar but I guess you want something that can be configured once for the entire query.
I'll add your suggestion to the card and we'll have a think about how best to address the issue. In the meantime though I'm afraid you're stuck with the workaround (sorry 🙂)
Awesome! Thanks a lot. Subscribing to the issue, although the work-around is not a problem for me :)
Hey @U09MR0T5Y just to confirm - you would prefer the attribute to not appear at all? And not simply have a value of nil
?
Although I guess it comes down to the whole billion dollar mistake issue, where datomic chooses to not let you insert a nil at all. But I'm sure you as database developers have a stronger opinion on the issue than I do.
Haha, yeah it's a tough call... https://en.wikipedia.org/wiki/Null_(SQL)#Controversy