           :mutation ::mutation-tx)
     (default-gen ::gen-transaction)))
 
+
 (comment
-  (gen/sample (s/gen ::query))
+  (time
+    (clojure.test.check/quick-check 30
+      (clojure.test.check.properties/for-all [query (make-gen {::gen-params
+                                                               (fn [_] (gen/map gen/keyword gen/string-ascii))}
+                                                      ::gen-transaction)]
+        (fp/query->ast query))))
+
+  (gen/sample (make-gen {::gen-params
+                         (fn [_] (gen/map (gen/return :param) gen/string-ascii))
+
+                         ::gen-property
+                         (fn [_] (gen/return :prop))
+
+                         ::gen-union-key
+                         (fn [_] (gen/elements [:a :b :c]))
+
+                         ::gen-ident
+                         (fn [_] (gen/return [:by-id 42]))}
+                ::gen-query)
+    10)
 
   (let [system (assoc generators
                  ::gen-params


(defn default-gen [name]
  #((get generators name) generators))

(s/def ::property keyword?)
(s/def ::special-property #{'*})


   ::gen-join-key
   (fn gen-join-key [{::keys [gen-property gen-ident gen-join-key-param-expr] :as env}]
     (gen/frequency [[10 (gen-property env)]
                     [3 (gen-ident env)]
                     [1 (gen-join-key-param-expr env)]]))

   ::gen-join-key-param-key
   (fn gen-join-key-param-key [{::keys [gen-property gen-ident] :as env}]
