        (doto to (put! v) (close!)))))
   to)
 
-(defn resolve [channel context query-or-ast]
+(defn resolve [channel env query-or-ast]
   (let [ast (if (vector? query-or-ast)
               (om/query->ast query-or-ast)
               query-or-ast)
-        resolvers (:resolvers context)
+        resolvers (:resolvers env)
         children (:children ast)]
     (async/pipe
      (async/merge

                   #(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)}))]
       (->> pets
            (map #(set/rename-keys % {:name :pet/name
                                      :species :pet/species

            (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
