This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-16
Channels
- # announcements (5)
- # asami (4)
- # babashka (72)
- # beginners (241)
- # calva (15)
- # cider (2)
- # circleci (5)
- # clara (41)
- # clj-kondo (38)
- # cljsrn (4)
- # clojars (33)
- # clojure (283)
- # clojure-europe (41)
- # clojure-nl (9)
- # clojure-uk (11)
- # clojuredesign-podcast (14)
- # clojurescript (76)
- # conjure (12)
- # cryogen (42)
- # data-science (1)
- # datalog (6)
- # datomic (7)
- # depstar (10)
- # events (2)
- # figwheel-main (1)
- # fulcro (22)
- # funcool (1)
- # london-clojurians (1)
- # malli (8)
- # meander (11)
- # off-topic (12)
- # pathom (19)
- # re-frame (8)
- # reveal (34)
- # shadow-cljs (34)
- # sql (7)
- # vim (8)
- # xtdb (6)
Is there a standardized way to handle access control with pathom? i have an upstream resolver that checks for access but I’d like to prevent downstream resolvers from resolving for cases where access is restricted. I can do a runtime check in each resolver to see if the upstream resolved value is something like :access-denied
but I’m curious if there’s something more baked into pathom (I couldn’t find anything when looking through the docs)
When I pass identity as {::pc/transform identity}
to my defresolver I’m getting identity - failed: fn?
Has anyone seen something similar? (I’m using alpha15)
Edit: I think it’s a bug. I’ll get a test pushed up and see if I can trace it. Here’s the failing test: https://github.com/wilkerlucio/pathom/pull/176 and a potential fix.
My PR didn’t fully address the issue so I went ahead and closed it and will reopen when I get a better solution.
I believe the problem is that the spec is checking at compilation time rather than run time so to the compiler it’s just seeing transform as a symbol, persistentlist, etc.
gotcha, makes sense, I'm doing a few tests here, I guess the solution is to move the validation into resolver
instead of defresolver
for the options map, this way validate on the realised values (instead of the macro stuff)
@U2U78HT5G can you try alpha16-SNAPSHOT and see if that works as expected for you?
this was the change in case someone is curious: https://github.com/wilkerlucio/pathom/commit/c9292962b54c2ad2820a626a8c82522798fa40bf
thanks! with it now being a runtime check should we wrap it with (when p.misc/INCLUDE_SPECS
?
I have a little concern with performance, but not much, unless someone is doing resolver generation on the fly all the time, this shouldn't be an issue, and for those cases the user can create the resolver without going though pc/resolver
the specs on connect are using guardrails to define, they don't check for p.misc/INCLUDE_SPECS