       (::run-and node)))
 
 (defn collect-syms
-  ([out env node] (collect-syms out env node #{}))
-  ([out
+  ([graph env node] (collect-syms graph env node #{}))
+  ([graph
     env
     {::keys [node-id]} syms]
-   (let [node (get-in out [::nodes node-id])]
+   (let [node (get-in graph [::nodes node-id])]
      (if-let [sym (pc-sym node)]
        (if (dynamic-resolver? env sym)
          syms
          (conj syms sym))
-       (into syms (mapcat #(collect-syms out env {::node-id %}) (node-branches node)))))))
+       (into syms (mapcat #(collect-syms graph env {::node-id %}) (node-branches node)))))))
 
 (defn all-attribute-resolvers
   [{:com.wsscode.pathom.connect/keys [index-oir]}

  (swap! id-counter inc))

(defn get-node
  [out node-id]
  (get-in out [::nodes node-id]))

(defn get-root-node [{::keys [root] :as out}]
  (get-node out root))

(defn node-kind [node]
  (cond

                  children))))))

(defn find-latest-providing-node
  [{::keys [root] :as graph}
   {:com.wsscode.pathom.connect/keys [attribute]}]
  (loop [node-id root]
    (let [next-node-id (-> (get-node graph node-id) ::run-next)]
      (cond
        (not next-node-id)
        node-id

        (not (contains? (get-in graph [::nodes next-node-id ::provides]) attribute))
        node-id

        :else
        (recur next-node-id)))))

(defn compute-attribute-graph*
  [{::keys [root] :as graph}
   {:com.wsscode.pathom.connect/keys [index-oir attribute]
    ::keys                           [skip-attr-provided?]
    :as                              env}]
  (if (and skip-attr-provided? (attribute-provided? graph attribute))
    (update-in graph [::nodes root ::requires] merge-io {attribute {}})
    (let [new-graph
          (as-> graph <>
            (dissoc <> ::root)
            (reduce-kv
              (fn [graph inputs resolvers]
                (compute-input-resolvers-graph graph env inputs resolvers))
              <>
              (get index-oir attribute)))]
      (if (::root new-graph)
        (compute-root-and new-graph env {::node-id root})
        (assoc new-graph ::root root)))))

(defn compute-attribute-graph
  "Compute the run graph for a given attribute."
  [{::keys [unreachable-attrs] :as graph}
   {::keys                           [available-data attr-deps-trail]
    :com.wsscode.pathom.connect/keys [index-oir]
    {attr :key}                      :edn-query-language.ast/node
