   ([version :- s/Keyword
     query
     options
-    context :- query-options-schema
+    context :- query-context-schema
     row-fn]
    (let [{:keys [scf-read-db url-prefix warn-experimental pretty-print log-queries]
           :or {warn-experimental true

   If the query can't be parsed, a 400 is returned."
  [version :- s/Keyword
   query-map
   options :- query-options-schema]
  (if use-preferred-streaming-method?
    (preferred-produce-streaming-body version query-map options)
    (deprecated-produce-streaming-body version query-map options)))

(pls/defn-validated object-exists? :- s/Bool
  "Returns true if an object exists."

  (->> (or (System/getenv "PDB_USE_DEPRECATED_QUERY_STREAMING_METHOD") "yes")
       (re-matches #"yes|true|1") seq not))

(def query-context-schema
  {:scf-read-db s/Any
   :url-prefix String
   :node-purge-ttl Period
