Skip to content

Instantly share code, notes, and snippets.

@ddeaguiar
Last active March 23, 2017 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ddeaguiar/d93a81282b60a261a2afb53262a3aeeb to your computer and use it in GitHub Desktop.
Save ddeaguiar/d93a81282b60a261a2afb53262a3aeeb to your computer and use it in GitHub Desktop.
Vase route snippet with `or`
{
...
"/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