Last active
March 23, 2017 15:20
-
-
Save ddeaguiar/d93a81282b60a261a2afb53262a3aeeb to your computer and use it in GitHub Desktop.
Vase route snippet with `or`
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
... | |
"/user" {:get #vase/query {:name :your-first-api.v1/user-page | |
;; Params are required if they don't have defaults | |
:params [identifier] | |
:edn-coerce [identifier] | |
:query [:find (pull ?e [*]) | |
:in $ ?identifier | |
:where | |
(or | |
[?e :user/userId ?identifier] | |
[?e :user/userEmail ?identifier])]} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment