                 (mapcat (fn [{:keys [type name]}]
                           (let [params    (get ident-map name)
                                 input-set (ident-map-params->io input params)
-                                fields    (-> (get index-io #{(type-key prefix (:name type))}) keys)]
+                                fields    (-> (get index-io #{(ffirst (type->field-entry prefix type))}) keys)]
                             (mapv (fn [field]
                                     [field {input-set #{resolver}}])
                               fields)))))

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

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

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


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