                    #(parser {:state (atom %)} (mapv om/ast->query (:children ast)))))))
 
    :user/pets
-   (fn [context ast]
-     (p/alet [get-user-pets (get-in context [:apis :get-user-pets])
-              pets (p/await (get-user-pets {:name (:user/name context)}))]
+   (fn [env ast]
+     (p/alet [get-user-pets (get-in env [:apis :get-user-pets])
+              pets (p/await (get-user-pets {:name (:user/name env)}))]
        (->> pets
             (map #(set/rename-keys % {:name :pet/name
                                       :species :pet/species

       (doto to (put! v) (close!)))))
  to)

(defn resolve [channel context query-or-ast]
  (let [ast (if (vector? query-or-ast)
              (om/query->ast query-or-ast)
              query-or-ast)
        resolvers (:resolvers context)
        children (:children ast)]
    (async/pipe
     (async/merge

            (mapv #(parser {:state (atom %)} (mapv om/ast->query (:children ast)))))))

   :user/favorite-fellow-user
   (fn [env ast]
     (p/alet [get-user (get-in env [:apis :get-user])
              user (p/await (get-user {:name (:user/name env)}))]
       (resolve (chan)
                (assoc env :user/name (:favorite-fellow-user-name user))
                ast)))})

(deftest new-thing-works
