                p (s/gen ::params)]
        (list q p))))
 
+(s/def ::join-key-param-key (s/or :prop ::property :ident ::ident))
+
 (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)
+    (s/and list? (s/cat :expr ::join-key-param-key :params ::params))
+    #(gen/let [q (s/gen ::join-key-param-key)
                p (s/gen ::params)]
        (list q p))))
 

                                                       [10 (gen/return "123")]
                                                       [2 (gen/return [:a "b"])]
                                                       [1 (gen/return '_)]])))
(s/def ::ident (s/with-gen
                 (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))

  (:require [clojure.spec.alpha :as s]
            [clojure.test.check]
            [clojure.test.check.generators :as gen #?@(:cljs [:include-macros true])]
            [clojure.test.check.properties]
            [fulcro.client.primitives :as fp]))

(def ^:dynamic *query-gen-max-depth* 4)

