fixes for staging, parsing

This commit is contained in:
Bryce Covert
2020-12-27 08:28:50 -08:00
parent c9f35cf7b4
commit 544a69432c
6 changed files with 29 additions and 26 deletions

View File

@@ -19,13 +19,14 @@
:body (pr-str (ql/query (:identity r) (if (= request-method :get) (query-params "query") body) variables ))
:headers {"Content-Type" "application/edn"}})
(catch Throwable e
(log/info "here we are " (.getCause e))
(if-let [result (:result (ex-data e))]
(do (log/warn "Graphql Result error" e)
{:status 400
:body (pr-str result)
:headers {"Content-Type" "application/edn"}})
(if-let [message (:validation-error (ex-data e) )]
(if-let [message (:validation-error (ex-data (.getCause e)) )]
(do
(warn-event "GraphQL Validation error" {:message message
:data e})