Fork me on GitHub
#fulcro
<
2018-09-20
>
claudiu08:09:46

Are there any examples/resources on how to implement the defquery-entity defquery-root defmutation from fulcro.server with pathom ? 🙂

grease08:09:55

Any one here has deployed fulcro to either datomic ions or AWS lambda?

claudiu08:09:39

@mailgrease js or jvm ? I'm working on a small app now with fulcro backend on nodejs, (for appengine standard nodejs, give or take similar to lambadas). So far so good, still working a bit on getting nice SSR and writing the backend api with pathom.

grease08:09:25

JVM, in my case.

claudiu08:09:54

haven't tried. If you're not interested in SSR and just want the fulcro server ("/api") for lambdas. There you can use fulcro server or just do your own thing and use https://github.com/wilkerlucio/pathom for the parsing the queries.

grease09:09:11

Thanks. Let me try that out

tony.kay15:09:49

@claudiu Replace the Fulcro server-parser with a pathom parser. At that point do not use the defquery* macros. For mutations, pass :mutate fulcro.server/server-mutate to the pathom parser, and you can then still use defmutation for the server.

tony.kay15:09:31

Use Pathom connect API to build up the read side.

tony.kay15:09:11

alternatively, you can make parsers with pathom that “start” at specific places, and then have multiple parsers…in that case you could leave the fulcro parser in place, and pull the query from env (which will be the subquery of the load…e.g. the component’s query), and process that with a pathom parser. If you replace Fulcro’s parser, though, you’ll get better tool support, and I think your overall read stuff will be cleaner

tony.kay15:09:20

Just look at what queries the load and load-field generate…they’re really just single joins (or even single props if you don’t supply a component to load).

claudiu15:09:47

@tony.kay thank you. Will try looking at load, the plan is to use pathom without the fulcro server stuff. Was wondering if there any docs/exaples to help me have it running fast for some basic operations :D

tony.kay15:09:02

I cover it in a video, there is a dev guide…

claudiu15:09:15

Awesome will check it out thank you. :)