@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.
@codonnell Thanks for the example! I'll check that out.
@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.*missing
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