This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-11
Channels
- # aleph (3)
- # beginners (42)
- # cider (219)
- # cljs-dev (39)
- # cljsjs (19)
- # cljsrn (3)
- # clojure (97)
- # clojure-canada (12)
- # clojure-dev (14)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-russia (1)
- # clojure-spec (3)
- # clojure-uk (140)
- # clojurescript (52)
- # clojutre (2)
- # cursive (2)
- # datomic (29)
- # docs (1)
- # duct (13)
- # emacs (19)
- # fulcro (8)
- # funcool (2)
- # graphql (26)
- # hyperfiddle (1)
- # luminus (9)
- # nyc (7)
- # off-topic (26)
- # om (21)
- # onyx (19)
- # overtone (1)
- # pedestal (4)
- # re-frame (10)
- # reagent (109)
- # ring (5)
- # rum (15)
- # shadow-cljs (120)
- # spacemacs (22)
- # specter (7)
- # vim (10)
please confirm if I am right. If I want give users possibility to download pdf file by API still I should use REST API. Is there alternative?
Right. GraphQL doesn’t encompass file upload or download. Your schema should expose a field with the correct URL.
anyone know of an example of mapping lacinia resolvers to Datomic queries? It seems like it should be relatively straightforward, but seeing how someone else has tackled it would be a big help.
My top-level queries return lists of entity-maps (e.g. #(d/entity db ref)
), and the one field resolver are essentially (fn [context args container] (get container (datomic->graphql k))
.
I'd love to make the code generic, but I think it's too tied to assumptions we make.
I also have utilities for converting graphql to datomic attributes and back. Also with assumptions, unfortunately.
Our datomic attributes are, like, ":program/legacy-degree-offering". GraphQL does not allow dashes, slashes, or namespaces, and prefers camelCase, so we mechanically map it to ":legacyDegreeOffering".
I'm hoping to rename the Datomic attributes to be things like :Program/legacyDegreeOffering
over time, but this will require a lot of little bits of work.
to some extent I’m still wrapping my head around what’s in the resolver arguments besides args, so there’s that too.
@curtosis this does a lot of the legwork https://github.com/workframers/stillsuit
Let me know if you have questions about stillsuit, it's my company's project. We open-sourced it but haven't yet embarked on publicizing it. There's a good amount of docs here though: http://docs.workframe.com/stillsuit/current/manual/
I'm not sure when I can look into it. Also, I kind of did a bunch of this, but maybe not in the same way, and I can't break compatibility for clients. I'd love for it to work out, though. I have been looking for reusable pieces to take out of our code, as the code base is getting large for my taste.