This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-16
Channels
- # announcements (2)
- # beginners (50)
- # boot (80)
- # calva (4)
- # cider (58)
- # cljs-dev (11)
- # clojure (140)
- # clojure-brasil (1)
- # clojure-denver (1)
- # clojure-dev (10)
- # clojure-europe (8)
- # clojure-finland (2)
- # clojure-italy (5)
- # clojure-nl (2)
- # clojure-quebec (1)
- # clojure-spec (2)
- # clojure-sweden (4)
- # clojure-uk (94)
- # clojurescript (98)
- # cursive (19)
- # data-science (1)
- # datascript (9)
- # datomic (43)
- # emacs (2)
- # fulcro (29)
- # graphql (41)
- # hoplon (15)
- # jobs (2)
- # kaocha (4)
- # liberator (24)
- # off-topic (9)
- # perun (1)
- # re-frame (11)
- # reagent (17)
- # reitit (8)
- # remote-jobs (2)
- # rum (2)
- # shadow-cljs (24)
- # spacemacs (1)
- # specter (1)
- # tools-deps (21)
We do the auth in the interceptor pipeline; the auth occurs after parsing the query such that we can apply rules about which api keys can access which operations.
We are doing authentication before Lacinia enters into play, but for authorization we deal within each resolver accordingly.
Our auth resolves to api keys that list which operations a particular client has access to.
If the way interceptors and routes work in lacinia-pedestal seems complicated, it's because we have that need to inject interceptors and sometimes replace the default interceptors.
I appreciate this approach - I had to replace some interceptors and it was very straightforward.
I thin I want to have login (auth) separate from graphql, because for API integrations I will have generated tokens like in github. So this tokens can be used with graphql directly, while web browser will use sessions in ring. Does it make sense?
So there is no way to login and get some data in 1 graphql query. I don’t want to have such option. For that purpose people should use generated tokens.
Summary up: for web browsers: 1) login with REST and save user id in session 2) query with graphql for API integrations 1) generate tokens 2) use tokens with graphql directly
https://www.3scale.net/ this kind of thing
hmm on the other hand it can be done in graphql only. Login which return session token or something ike that
(defn start-server
[_]
(let [server (-> schema
(lp/service-map {:graphiql true})
http/create-server
http/start)]
(browse-url " ")
server))
Do you have example of code how to run this but with ring?If you see the source of lacinia-pedestal it should be relatively obvious what’s going on
heh seeing source code of lacincia-pedestal my conclusion is I want to use pedestal for dev 😉
https://apis.guru/graphql-voyager/ do you recommend any tool like that, but instead paste schema fill field with URI?