This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-07
Channels
- # beginners (41)
- # boot (38)
- # cider (17)
- # cljs-dev (52)
- # cljsjs (3)
- # clojure (200)
- # clojure-italy (8)
- # clojure-russia (50)
- # clojure-spec (28)
- # clojure-uk (45)
- # clojurescript (28)
- # core-async (9)
- # core-matrix (2)
- # cursive (16)
- # datascript (15)
- # datomic (50)
- # dirac (5)
- # emacs (20)
- # figwheel (8)
- # flambo (2)
- # hoplon (10)
- # incanter (1)
- # jobs (1)
- # leiningen (2)
- # lumo (26)
- # mount (171)
- # off-topic (22)
- # om (54)
- # onyx (2)
- # pedestal (27)
- # re-frame (10)
- # reagent (12)
- # ring (27)
- # ring-swagger (3)
- # rum (2)
- # slack-help (1)
- # spacemacs (134)
- # specter (6)
- # sql (15)
- # testing (20)
- # uncomplicate (5)
- # unrepl (49)
- # untangled (9)
- # yada (29)
@ddeaguiar Looking for a sanity check. #vase/transact
properties do not allow for defaults. However, Datomic doesn’t allow nils in transactions. That means we can’t have optional properties to a transact. Seems like an oversight to me.
I want to add the same defaulting syntax to transact’s properties that query’s params has. Does anything there sound like it violates the principle of least surprise?
@U06BLR1C6, I’m biased by my knowledge of Datomic, so I think it does violate the principle of least surprise. It would make Query and Transact more symmetrical, though. However, I don’t think that’s a good enough reason to make it a supported feature. It’s also something that can be easily implemented on the client side. I’d hold off unless there’s a demand for it.
If anything, nils should be filtered out. I don’t know if this is a property of #vase/transact
or not
Filtering nils is a good idea. I’ll do that now because it’s the smaller change to behavior.
Hi everyone, I'm not being able to make Pedestal reload code on changes from the default project template. I've run lein run-dev
. Is there something missing? I'm new to Clojure and still trying to get my feet wet. 🙂
@imetallica check this article http://pedestal.io/guides/pedestal-with-component.
hi guys, does pedestal test response-for
supports passing params like transit-params
or only headers
and body
?
@nxqd cool, I'll have a read.
@imetallica you just need to reload the service
ns
@nxqd only body
and headers
. Refer to the doc-string of response-for
https://github.com/pedestal/pedestal/blob/master/service/src/io/pedestal/test.clj#L262
@ddeaguiar I'm seeing a much more nested structure than that. With route:
"/users" {:get <#C49BSM9B3|vase>/query {:name :receipts-server.v1/users-get
:query [:find (pull ?e [*])
:where [?e :user/name]]}}
and query GET
I get back
[[[["^ ","~:db/id",17592186045426,"~:user/name","David Goldfarb","~:user/abbrev","D","~:user/email",""]],[["^ ","^0",17592186045428,"^1","Shoshana Goldfarb","...
hrm, so you can get rid of some of the nesting by doing this :find [(pull ?e [*]) ...]
It’s an indication that you expect a collection of results back for the query expression
With that change, I now get this: [[["^ ","~:db/id",17592186045426,"~:user/name","Degel","~:user/abbrev","Degel"]]]
. It looks like it only retrieved one user.
I'm going to disappear in a few minutes, and I'll be only very intermittently here for the next two weeks. Apologies if I go silent; these slack channels hit the history horizon so fast that I may not even know you were talking to me.
@ddeaguiar yeah I have read the docs. So we still need a http client lib like clj-http
to do integration test? it would be great if response-for
supports transit-params
and such 😄
@ddeaguiar hmm, yeah, forgot it. Thanks !
This does reduce a level. But, still a nested vector rather than the map shown int the Datomic docs.
Is there a way to gracefully shut down a SSE stream? If I have a client that connects and then disconnects sometime later, I always receive this error message:
WARN io.pedestal.http.impl.servlet-interceptor - {:msg "The pipe closed while async writing to the client; Client most likely disconnected.", :line 111, :src-chan #object[clojure.core.async.impl.channels.ManyToManyChannel 0x23572315 "clojure.core.async.impl.channels.ManyToManyChannel@23572315"]}