                                                                  :max-elements 50})
                             4)]
     (prop/for-all [{:keys [index query]}
-                    (gen/let [index (eql/make-gen (pcg/gen-connect-index props)
-                                                  ::pcg/gen-index)
-                              query (->> (eql/make-gen (pcg/gen-connect-query {::pc/indexes index})
-                                                       ::eql/gen-query)
-                                         (gen/fmap p/remove-query-wildcard))]
-                      {:index index :query query})]
-                   (let [plugins      [p/error-handler-plugin]
-                         parser       (p/parser {::p/plugins plugins})
-
-                         async-parser (p/async-parser {::p/plugins plugins})
-
-                         env          (assoc env ::p/reader [p/map-reader pc/all-readers]
-                                        ::pc/indexes index
-                                        ::pc/resolver-dispatch pct/resolve-fn)]
-                     (= (parser env query)
-                        (<!! (async-parser (assoc env ::p/reader [p/map-reader pc/all-async-readers]
-                                             ::pc/resolver-dispatch pct/async-resolve-fn) query)))))))
+                   (gen/let [index (eql/make-gen (pcg/gen-connect-index props)
+                                                 ::pcg/gen-index)
+                             query (->> (eql/make-gen (pcg/gen-connect-query {::pc/indexes index})
+                                                      ::eql/gen-query)
+                                        (gen/fmap p/remove-query-wildcard))]
+                     {:index index :query query})]
+      (let [plugins      [p/error-handler-plugin]
+            parser       (p/parser {::p/plugins plugins})
+
+            async-parser (p/async-parser {::p/plugins plugins})
+
+            env          (assoc env ::p/reader [p/map-reader pc/all-readers]
+                           ::pc/indexes index
+                           ::pc/resolver-dispatch pct/resolve-fn)]
+        (= (parser env query)
+           (<!! (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))


(defn valid-queries-props []
  (prop/for-all [query (eql/make-gen
                          {::eql/gen-params
                           (fn [_]
                             (gen/map gen/keyword-ns gen/simple-type-printable))}
                          ::eql/gen-query)]
                 (s/valid? ::eql/query query)))

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


                                                                 :max-elements 50})
                            4)]
    (prop/for-all [{:keys [index query]}
                   (gen/let [index (eql/make-gen (pcg/gen-connect-index props)
                                                 ::pcg/gen-index)
                             query (->> (eql/make-gen (pcg/gen-connect-query {::pc/indexes index})
                                                      ::eql/gen-query)
                                        (gen/fmap p/remove-query-wildcard))]
                     {:index index :query query})]
      (let [plugins         [p/error-handler-plugin]
            parser          (p/parser {::p/plugins plugins})
            async-parser    (p/async-parser {::p/plugins plugins})
            parallel-parser (p/parallel-parser {::p/plugins plugins})

            env             (assoc env ::p/reader [p/map-reader pc/all-readers]
                              ::pc/indexes index
                              ::pc/resolver-dispatch pct/resolve-fn)]
        (= (parser (assoc env ::p/reader [p/map-reader pc/reader2 pc/ident-reader]) query)

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

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

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

