   (s/with-gen
     (s/and list? (s/cat :expr ::param-expr-key :params ::params))
     #(gen/let [q (s/gen ::param-expr-key)
+               p (s/gen ::params)]
+       (list q p))))
+
+(s/def ::join-key-param-expr
+  (s/with-gen
+    (s/and list? (s/cat :expr ::join-key :params ::params))
+    #(gen/let [q (s/gen ::join-key)
                p (s/gen ::params)]
        (list q p))))
 

       (list key val))))

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

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

                 (s/and vector? (s/cat :ident ::property :value ::ident-value))
                 #(gen/let [s (s/gen (s/cat :ident ::property :value ::ident-value))]
                    (vec s))))
(s/def ::join-key (s/or :prop ::property :ident ::ident :param-exp ::join-key-param-expr))
(s/def ::join (s/map-of ::join-key ::join-query :count 1 :conform-keys true))
(s/def ::union (s/map-of ::property ::query :min-count 1 :conform-keys true))
(s/def ::recursion (s/or :depth (s/with-gen nat-int? #(s/gen (s/int-in 1 5)))
                         :unbounded #{'...}))

