Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
1e16miin committed Sep 6, 2024
1 parent 20296bc commit 1dc30fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src/com/walmartlabs/lacinia.clj
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
:or {timeout-ms 0
timeout-error {:message "Query execution timed out."}}} options
context' (cond-> context
(:analyze-query options) query-analyzer/enable-query-analyzer)
(:analyze-query options) query-analyzer/enable-query-analyzer)
execution-result (execute-parsed-query-async parsed-query variables context')
result (do
(resolve/on-deliver! execution-result *result)
Expand All @@ -90,7 +90,9 @@
(when (instance? Throwable result)
(throw result))

result)))
(if (:analyze-query options)
(assoc-in result [:extensions :analysis] (query-analyzer/complexity-analysis parsed-query))
result))))

(defn execute
"Given a compiled schema and a query string, attempts to execute it.
Expand Down
4 changes: 1 addition & 3 deletions src/com/walmartlabs/lacinia/executor.clj
Original file line number Diff line number Diff line change
Expand Up @@ -385,9 +385,7 @@
(let [enabled-selections (remove :disabled? selections)
*errors (atom [])
*warnings (atom [])
*extensions (if (::query-analyzer/enable? context)
(atom {:analysis (query-analyzer/complexity-analysis parsed-query)})
(atom {}))
*extensions (atom {})
*resolver-tracing (when (::tracing/enabled? context)
(atom []))
context' (assoc context constants/schema-key schema)
Expand Down

0 comments on commit 1dc30fa

Please sign in to comment.