             (dissoc out ::root)
             (-> env
                 (dissoc pc-attr)
-                (update ::run-next-stack p.misc/sconj (::root out))
-                (update ::attr-deps-stack p.misc/sconj (pc-attr env))
+                (update ::run-next-trail p.misc/sconj (::root out))
+                (update ::attr-deps-trail p.misc/sconj (pc-attr env))
                 (assoc ast-node (eql/query->ast (vec missing))
                   ::run-next (::root out)
                   ::provides (::provides root-node))))]

        run-next
        (assoc ::run-next run-next)))))

(defn extend-node-run-next [{::keys [index-syms] :as out} {::keys [run-next run-next-stack] :as env}]
  (if run-next
    (if-let [node-ids (seq (get index-syms (pc-sym env)))]
      (reduce
        (fn [out node-id]
          (if (contains? run-next-stack node-id)
            out
            (let [node      (get-in out [::nodes node-id])
                  new-out   (compute-root-and (assoc out ::root (::run-next node)) env {::node-id run-next})


(defn compute-attribute-graph
  [{::keys [unreachable-attrs] :as out}
   {::keys                           [available-data attr-deps-trail]
    :com.wsscode.pathom.connect/keys [index-oir]
    {attr :key}                      :edn-query-language.ast/node
    :as                              env}]
  (let [env (assoc env pc-attr attr)]
    (cond
      (or (contains? available-data attr)
          (contains? unreachable-attrs attr)
          (contains? attr-deps-trail attr))
      out

      (contains? index-oir attr)
