         (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]))}
+                         (fn [_] (gen/return {:param "value"}))}
                 ::gen-query)
     10)
 

(s/def ::query
  (s/coll-of ::query-expr :kind vector? :gen (default-gen ::gen-query)))

(s/def ::mutation-key (s/with-gen symbol? (default-gen ::gen-mutation-key)))

(s/def ::mutation-expr
  (s/with-gen
    (s/and list? (s/cat :mutate-key ::mutation-key :params (s/? ::params)))
    (default-gen ::gen-mutation-expr)))

(s/def ::mutation-join
  (s/map-of ::mutation-expr ::query :count 1 :conform-keys true))

(s/def ::mutation
  (s/or :mutation ::mutation-expr
        :mutation-join ::mutation-join))

(s/def ::mutation-tx
  (s/with-gen
    (s/and vector? (s/cat :mutations (s/+ ::mutation) :reads (s/* ::property)))
    (default-gen ::gen-mutation-tx)))

(s/def ::transaction
  (s/with-gen
    (s/or :query ::query
          :mutation ::mutation-tx)
    (default-gen ::gen-transaction)))

(comment
  (time
    (clojure.test.check/quick-check 30

    (s/and list? (s/cat :expr ::join-key-param-key :params ::params))
    (default-gen ::gen-join-key-param-expr)))

(s/def ::mutation-key (s/with-gen symbol? (default-gen ::gen-mutation-key)))

(s/def ::mutation-expr
  (s/with-gen
    (s/and list? (s/cat :mutate-key ::mutation-key :params (s/? ::params)))
    (default-gen ::gen-mutation-expr)))

(s/def ::mutation-join
  (s/map-of ::mutation-expr ::query :count 1 :conform-keys true))

(s/def ::mutation
  (s/or :mutation ::mutation-expr
        :mutation-join ::mutation-join))

(s/def ::query-expr
  (s/or :prop ::property
        :join ::join
        :ident ::ident
        :mutation ::mutation
        :param-exp ::param-expr
        :special ::special-property))

