Fork me on GitHub

How do I get to params in foreign AST? So I have a dynamic resolver, which trigger with query [{([:my/id 1] {:param/test "test"}) [:my/name]}] so query with an ident with a param on it. The foreign AST my dynamic resolver gets is {:type :root :children […. node for :my/name]} . I couldn’t find :param/test anywhere in the whole environment in my dynamic resolver resolve function


you are probably asking how to access "parent" params in :my/name resolver. Well, pathom do not "support" that, but as #fulcro add the parameters in this place by default, I used to use a code like this in one of my projects:

(defn eql-api
  (let [query (... req)
        ast (eql/query->ast query)
        root-params (-> ast
                      (->> (keep :params)
                        (apply merge)))
        result (parser (assoc env :root-params root-params)
    {:status 200
     :body   result ...}))