Fork me on GitHub
Chris O’Donnell00:04:21

It seems reasonable to me to accomplish something like this by walking the entity returned alongside the ast as a post-processing step, applying the coercion based on the key. Is there a good place to hook into the parsing process to accomplish this? I wrote a little inspector plugin that logs the env after each reader call has finished and found it was called twice with my query results (and twice with a pathom/trace key):

(def inspect-plugin
   (fn [reader]
     (fn [env]
       (let [ret (reader env)]
         (js/console.log {:env env :ret ret})
Not sure if that plugin is doing something funky, but it would be nice to inject a coercion function in a place where it just gets called once.


@codonnell hello, that sounds a good extension point, currently there is already a parsing process that walks the graphql response to do things like munging and placeholder processing, but currently this part is not extensible


can you open an issue so I can track this idea to add support for graphql inner parser extensions?