Fork me on GitHub
Eric Ihli17:05:15

Does something special need to be done to reload a resolver after I edit it while working in the REPL? I made a change to the return value of a resolver and then re-evaluated the buffer where my resolver and parser are defined. But running a query afterwards doesn't pick up the change.


if you’re calling the pathom parser directly then just redefining it should work fine, defresolver expands to def but for more complex apps you might want to go with some state management library (mount, integrant, etc) + with tools.namespace for code reload, because often there’re things which have lifecycle semantics (like a server) and if your pathom parser is accessed via the server, you need to reload the server as well


Yes, you have to reload your parser, your parser caches your resolver definitions, so you need to update it, just make sure you’re doing that =)… You might be calling an older version of the parser, I’ve done that before…

λustin f(n)19:05:58

What is the best way to add a GraphQL api support to an existing Pathom setup? As in, supports GraphQL requests, not just consuming an existing GraphQL data source.

λustin f(n)19:05:13

I have a legacy Javascript/React ui I need to support that I want to introduce a better data management and request layer to. To keep things more simple for the UI devs, I was hoping to use some sort of GraphQL client library like

λustin f(n)19:05:17

Is Basically the only option? I was hoping not to add in another layer of library that might not be updated. Plus, wouldn't it include re-writing whatever pathom resolvers already exist?


graffiti is the only option I know for that currently