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
(defn multi-answer [answer] | |
(cond | |
(or (contains? answer :answer/lat) | |
(contains? answer :answer/lon)) :answer.type/text-with-location | |
:else :answer.type/text)) | |
(defmulti data-type multi-answer) | |
(s/def :answer/text (and string? #(<= (count %) 4096))) |
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
(p.plugin/defplugin mutation-resolve-params-with-entity | |
"Remove the run stats from the result meta. Use this in production to avoid sending | |
the stats. This is important for performance and security. | |
TODO: error story is not complete, still up to decide what to do when params can't | |
get fulfilled." | |
{::pcr/wrap-mutate | |
(fn mutation-resolve-params-external [mutate] | |
(fn mutation-resolve-params-internal [env {:keys [key] :as ast}] | |
(let [{::pco/keys [params]} (pci/mutation-config env key) |
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
(p.plugin/defplugin mutation-resolve-params | |
"Remove the run stats from the result meta. Use this in production to avoid sending | |
the stats. This is important for performance and security. | |
TODO: error story is not complete, still up to decide what to do when params can't | |
get fulfilled." | |
{::pcr/wrap-mutate | |
(fn mutation-resolve-params-external [mutate] | |
(fn mutation-resolve-params-internal [env {:keys [key] :as ast}] |
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 {:dependencies [[org.clojure/tools.namespace "0.2.3"] | |
[spyscope "0.1.3"] | |
[criterium "0.4.1"]] | |
:injections [(require '(clojure.tools.namespace repl find)) | |
; try/catch to workaround an issue where `lein repl` outside a project dir | |
; will not load reader literal definitions correctly: | |
(try (require 'spyscope.core) | |
(catch RuntimeException e))] | |
:plugins [[lein-pprint "1.1.1"] | |
[lein-beanstalk "0.2.6"] |