 (test/defspec parser-system {:max-size 12 :num-tests 100} (parser-test-props pct/parser-env))
 
 (comment
-  (let [props (gen/generate (gen/vector-distinct gen/keyword-ns {:min-elements 8
-                                                                 :max-elements 100})
-                4)
-        query-gen (s.query/make-gen {::s.query/gen-property
-                                     (fn [_] (gen/elements props))
-
-                                     ::s.query/gen-params
-                                     (fn [_] (gen/map gen/keyword gen/simple-type-printable {:max-elements 3}))}
-                    ::s.query/gen-query)
-        queries (take 20 (gen/sample-seq query-gen 16))]
-    (def queries queries))
-
-  (let [env pct/parser-env
-        plugins      [pp/profile-plugin]
-        parser       (p/parser {::p/plugins plugins
-                                :mutate     pt/mutate-fn})
-
-        async-parser (p/async-parser {::p/plugins plugins
-                                      :mutate     pt/mutate-fn})
-        {:keys [async-reader] :as env} env]
-
-    (doseq [query queries]
-      (parser env query))
-
-    #_
-    (criterium/with-progress-reporting
-      (criterium/bench
-        (doseq [query queries]
-          #_ (parser env query)
-          ((comp <!! async-parser) (assoc env ::p/reader async-reader) query)))))
-
-  (time
-    (clojure.test/test-vars [#'profile-speed]))
-
-  (criterium/with-progress-reporting
-    (criterium/bench
-      (clojure.test/test-vars [#'profile-speed]))))
+  (tc/quick-check 100 (parser-test-props pct/parser-env) :max-size 12))
 
 (defn connect-read-props [env]
   (let [props (gen/generate (gen/vector-distinct gen/keyword-ns {:min-elements 8


(test/defspec generator-makes-valid-queries {:max-size 12 :num-tests 50} (valid-queries-props))

(defn normalize-mutation-error [x]
  (walk/prewalk
    (fn [x]

           (<!! (async-parser (assoc env ::p/reader [p/map-reader pc/all-async-readers]
                                         ::pc/resolver-dispatch pct/async-resolve-fn) query)))))))

(test/defspec connect-read {:max-size 10 :num-tests 100} (connect-read-props pct/parser-env))

(comment
  (tc/quick-check 100 (connect-read-props pct/parser-env) :max-size 10))

(defn connect-read-planned-props [env]
  (let [props (gen/generate (gen/vector-distinct gen/keyword-ns {:min-elements 8
                                                                 :max-elements 50})
                4)]
