This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-05-16
Channels
- # beginners (176)
- # boot (11)
- # cider (12)
- # cljs-dev (65)
- # cljsrn (54)
- # clojars (18)
- # clojure (195)
- # clojure-austin (1)
- # clojure-dev (2)
- # clojure-italy (8)
- # clojure-quebec (1)
- # clojure-russia (51)
- # clojure-serbia (3)
- # clojure-spec (24)
- # clojure-uk (28)
- # clojurescript (41)
- # cursive (14)
- # data-science (60)
- # datascript (2)
- # datomic (111)
- # emacs (6)
- # figwheel (1)
- # graphql (16)
- # hoplon (26)
- # juxt (2)
- # lein-figwheel (3)
- # lumo (12)
- # off-topic (8)
- # om (14)
- # pedestal (22)
- # perun (2)
- # proton (1)
- # re-frame (29)
- # reagent (27)
- # ring (17)
- # ring-swagger (2)
- # rum (3)
- # spacemacs (3)
- # unrepl (155)
- # untangled (28)
- # vim (4)
@kenny we're building a new app with lacinia & datomic and try to match the schema as much as possible with the datomic schema
by default a field resolves to a datomic attribute and we use the Entity API to resolve those
With lacinia 0.17.0 this will become a easier as a resolver will be able to return a datomic Entity (https://github.com/walmartlabs/lacinia/pull/59)
the namespace problem we solve by convention: take the entity keys, find the 'id' field and take its namespace.
you could solve the namespace problem also by e.g. taking the graphql type of the surrounding object and using that as the namespace
in the context there is :com.walmartlabs.lacinia/selection
which provides you all the information about what you're trying to resolve at this point
I've been working on some stuff and would love feedback before it's committed. https://github.com/walmartlabs/lacinia/issues/65
BTW, in terms of resolvers for namespaced keys. We haven't documented this yet, but in a schema, a resolver entry can be a list rather than a simple keyword. attach-resolvers
treats this differently, it treats it as a function call with parameters, rather than a simple lookup.