 
 (defn index-idents [{::keys [prefix ident-map]}]
   (into #{}
-        (map #(apply entity-field-key prefix %))
+        (map #(ident-map-entry prefix %))
         (->> (vals ident-map)
              (filterv #(= 1 (count %)))
              (map vals)

        fields (-> schema :queryType :fields)
        idents (filter (comp ident-map :name) fields)]
    (-> {}
        (into (mapcat (fn [{:keys [type name]}]
                        (let [params        (get ident-map name)
                              ident-key     (keyword (kebab-case name) (kebab-case (str/join "-and-" (keys params))))
                              entity-fields (mapv (fn [[entity attr]] (entity-field-key prefix entity attr)) (vals params))
                              entity-field  (cond-> entity-fields (= 1 (count entity-fields)) first)
                              fields        (-> (get index-io #{(type-key prefix (:name type))})
                                                keys)]
                          (mapv (fn [field]
                                  [field {::entity-field entity-field

      (let [[entity field] (first (vals fields))]
        (assoc root-field ::entity-field (entity-field-key prefix entity field))))))

(defn ident-map-entry [prefix item]
  (cond
    (keyword? item) item
    (vector? item) (entity-field-key prefix (first item) (second item))))

(defn ident-map-params->io [{::keys [prefix]} params]
  (->> params vals (into #{} (map (fn [item] (ident-map-entry prefix item))))))

(defn index-schema-io [{::keys [prefix schema ident-map] :as input}]
  (let [schema (:__schema schema)]
