Fork me on GitHub

@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. 🙂


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


@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 [*]) ...]


That’s from memory so I think it’s correct 🙂


Interesting. What does that mean exactly?


It’s an indication that you expect a collection of results back for the query expression


I would have thought you’d get maps back in that nested structure you pasted above


I’m curious. Let me run a quick test


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 😄


@nxqd, you should be able to generate a transit payload as the :body


@ddeaguiar hmm, yeah, forgot it. Thanks !


Note how a level of nesting was removed by using ...


Got it. I hadn't realized above that the ... was literal.


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 "[email protected]"]}