 (defn- cancel-run-expression?
   [expression]
   (= 'run/cancel (first expression)))
-
-(defn- org-runs-ast?
-  "returns true if the ast is for an expression rendering the org workflows page"
-  [expr-ast]
-  (boolean (and (= :circleci/organization (:key expr-ast))
-                (expr-ast/has-children? expr-ast
-                                        #{:routed-page
-                                          :organization/name
-                                          :organization/vcs-type}))))
-
-(defn- get-org-runs
-  "Retrieves workflow runs for and org and merges them into the
-  app. Takes an expression ast, send callback, and query."
-  [expr-ast send-cb query]
-  (let [vcs-type (-> expr-ast :params :organization/vcs-type)
-        org-name (-> expr-ast :params :organization/name)
-        {:keys [connection/offset connection/limit]}
-        (:params (expr-ast/get-in expr-ast [:routed-page]))]
-    (api/get-org-workflows
-     (callback-api-chan
-      (fn [response]
-        (let [novelty {:circleci/organization
-                       {:routed-page
-                        {:connection/total-count (:total-count response)
-                         :connection/edges (->> (:results response)
-                                                (map adapt-to-run)
-                                                (mapv #(hash-map :edge/node %)))}}}]
-          (send-cb novelty query))))
-     vcs-type
-     org-name
-     {:offset offset :limit limit})))
 
 (defn- branch-crumb-ast?
   "returns true if the ast is for an expression rendering the branch

      (js/setTimeout #(send* [:remote (rest query)] cb)
                     ms-until-retried-run-retrieved))
    (doseq [expr query]
      (if (resolvers-can-handle? expr)
        (let [ch (resolve {:resolvers resolvers} [expr] (chan))]
          (go-loop []
            (when-let [novelty (<! ch)]
              (cb novelty query)
              (recur))))

        (let [[expr cb] (de-alias-expression expr cb)
              ast (om-parser/expr->ast expr)]
          (cond
            ;; :route/org-workflows
            (org-runs-ast? ast) (get-org-runs ast cb query)))))))

(defn send [remotes cb]
  (doseq [remote-entry remotes]

            (let [adapted (:run/project (adapt-to-run response))]
              (parser {:state (atom adapted)} (mapv om-next/ast->query (:children ast))))))))})

(defmulti send* key)

;; This implementation is merely a prototype, which does some rudimentary
