pathom

:pathom: https://github.com/wilkerlucio/pathom/ & https://pathom3.wsscode.com & https://roamresearch.com/#/app/wsscode
2020-09-03T00:11:16.004300Z

@joshuawood2894 here's an example of how to use pathom with postgres if it's helpful: https://chrisodonnell.dev/posts/giftlist/backend_persistence/ Not sure how different mssql might be.

Josh Wood 2020-09-03T14:21:26.005300Z

@codonnell Thanks for the example! I'll check that out.

Josh Wood 2020-09-03T14:32:21.012300Z

@wilkerlucio So I'm trying to create a Fulcro/Pathom application with a mssql db starting with the Fulcro template. In the template's Pathom parser, it has a /env-wrap-plugin function that I'm trying to use to connect the db via next.jdbc. This is how I'm handling it at the moment.

(def db {:dbtype "mssql"
         :dbname ""
         :host ""
         :port ""
         :user ""
         :password ""})

(def con (jdbc/get-connection db))
(def ds (jdbc/get-datasource db))
.
.
.
::p/plugins [(pc/connect-plugin {::pc/register my-resolvers})
             (p/env-wrap-plugin (fn [env]
                                  ;; Here is where you can dynamically add things to the resolver/mutation
                                  ;; environment, like the server config, database connections, etc.
                                  (assoc env
                                    :db ds
                                    :connection con)))
This code compiles and I've tested to see if con and ds succeed in the repl.. no errors. The confusing part to me is when I write a resolver that matches content in my db and try to use Fulcro Inspect to run a query, the parser doesn't seem to wrap the connection e.c. the queries don't come back at all, not even with a 'not found'. Any suggestions? I am new to this architecture so there's surely something fundamental that I'm mission here.

Josh Wood 2020-09-03T14:37:53.012500Z

*missing

psdp 2020-09-03T22:51:53.012800Z

Hello, need some help here. I set ::pc/key-process-timeout to 300000 in parallel-parser settings, but it seems to have no effect. Still getting error Parallel read timeout timeout: 60000