            (ex-info (str "No queries exist for component path " cp)
              {:type :cellophane.next/no-queries})))))))
 
-(defn- unique-ident? [x]
-  (and (ident? x) (= '_ (second x))))
-
 (defn- normalize* [query data refs union-seen]
   (cond
     (= '[*] query) data


;; =============================================================================
;; Utilities

(defn ident?
  "Returns true if x is an ident."
  [x]
  (and (vector? x)
    (== 2 (count x))
    (keyword? (nth x 0))))

(defn recursion? [x]
  (or (= '... x)
      (number? x)))

(defn- expr->key
  "Given a query expression return its key."

                  v       (get data k)]
              (cond
                ;; graph loop: db->tree leaves ident in place
                (and recursive? (util/ident? v)) (recur (next q) ret)
                ;; normalize one
                (map? v)
                (let [x (normalize* sel v refs union-entry)]
