Fork me on GitHub
#pedestal
<
2017-04-06
>
rauh05:04:51

@curtosis Make sure you understand clojure syntax. :foo/bar is a normal namespaced keyword with foo being the namespace. ::foo/bar however resolves to the namespace of the alias foo

curtosis12:04:02

@rauh I do understand that. What I wasn’t getting (but do now) was how the default-interceptors interacted with ::http/interceptors – specifically, that ::http/interceptors takes manual control and doesn’t include the defaults.

curtosis12:04:02

which was sort of what you were saying, but it didn’t quite parse for me there. got it now!

deg21:04:46

What is returned by :find (pull ?e [*]) in a #vase/query? It seems to have more levels of nesting than I see in the Datomic pull documentation. I'm just ignoring the seemingly unused bits of the structure, but this feels like I'm doing something very wrong:

(defn response-from-pull [pull-response]
  (let [relevant (first pull-response)
        cruft1 (next pull-response)
        cruft2 (not-empty (remove nil? (map next relevant)))]
    (when (or cruft1 cruft2)
      (prn "ERROR: Unexpected pull response: " pull-response))
    (mapv first relevant)))

ddeaguiar23:04:02

[*] returns a map containing all top level keys of an entity plus the keys of any component attributes.