               ;; rest of the query.
               (parser {:state (atom adapted)} (mapv om-next/ast->query (:children ast))))))))
 
+   :project/workflow-runs
+   (fn [env ast]
+     (-> (api-promise
+          api/get-project-workflows
+          (vcs-url/vcs-url (:organization/vcs-type env)
+                           (:organization/name env)
+                           (:project/name env))
+          {:offset (:connection/offset (:params ast))
+           :limit (:connection/limit (:params ast))})
+
+         (p/then
+          (fn [response]
+            (let [adapted {:connection/total-count (:total-count response)
+                           :connection/edges (->> (:results response)
+                                                  (map adapt-to-run)
+                                                  (mapv #(hash-map :edge/node %)))}]
+              ;; Run the adapted structure through a parser to match it to the
+              ;; rest of the query.
+              (parser {:state (atom adapted)} (mapv om-next/ast->query (:children ast))))))))
+
    :app/current-user
    (fn [env ast]
      (-> (api-promise api/get-orgs :include-user? true)

       ;; Wrap the callback to rename the key in the result back to the alias.
       #(cb (rename-keys %1 {aliased-from (:key ast)}) %2)]
      [expr cb])))

(defn- merge-workflow-runs
  [{vcs-type :organization/vcs-type
    org-name :organization/name
    project-name :project/name}
   offset
   limit
   merge-fn
   query]
  (api/get-project-workflows
   (callback-api-chan
    (fn [response]
      (let [novelty {:circleci/organization
                     {:organization/project
                      {:project/name project-name
                       :project/organization {:organization/vcs-type vcs-type
                                              :organization/name org-name}
                       :routed-page {:connection/total-count (:total-count response)
                                     :connection/edges (->> (:results response)
                                                            (map adapt-to-run)
                                                            (mapv #(hash-map :edge/node %)))}}}}]
        (merge-fn novelty query))))
   (vcs-url/vcs-url vcs-type org-name project-name)
   {:offset offset :limit limit}))

(def ^:private ignore-response-callback (fn [_response] nil))


                                           :project/parallelism
                                           :project/oss?]}
                  {:organization/plan [*]}]
                (:query ast)))
        (project-runs-ast? ast))))

(defmulti send* key)

