   {:value (get @state key)})
 
 (defmethod read [nil ::route-data]
-  [{:keys [state] :as env} key user-parser]
+  [{:keys [state user-parser] :as env} key params]
   (let [st @state
         [route _] (get st ::route)
         query (infer-query env route)

  {:value (get @state key)})

(defmethod read [:default ::route-data]
  [{:keys [state target ast] :as env} key user-parser]
  (let [st @state
        [route _] (get st ::route)
        query (infer-query env route)

(defn dispatch
  "Helper function for implementing the read and mutate multimethods.
   Dispatches on the remote target and the parser dispatch key."
  [{:keys [target]} key _]
  [target key])

(defmulti read dispatch)

(defmethod read :default
  [{:keys [target] :as env} key params]
  (let [dispatch  [:default key]
        submethod (get-method read dispatch)
        this      (get-method read :default)]
    (if (and submethod (not= submethod this))
      (do
        (-add-method read dispatch submethod)
        (submethod env key params))
      (throw
        (ex-info (str "Missing multimethod implementation for dispatch value " dispatch)
          {:type :error/missing-method-implementation})))))
