Fork me on GitHub
#fulcro
<
2020-06-09
>
kosengan10:06:42

Can fulcro work with Leiningen?

zilti10:06:50

Sure, yes

kosengan11:06:43

In the 'Getting Started' section of the Docs, I can only see: 'Install Clojure CLI Tools'

zilti12:06:42

You don't need any CLI-Tool or Leiningen-specific features. The only thing I have to use the cli tools for is to resolve dependencies. Shadow-CLJS is doing the CLJS compilation, and the server start I do via REPL for development.

zilti12:06:51

It just doesn't make that much sense to use Leiningen in the first place here, since there's no feature one'd need it for. So unless you have some different tools or plugins, there is no reason to not go with what is pretty much the de-facto standard. But there's nothing in your way.

❤️ 4
zilti15:06:13

A defsc-report with data from multiple tables, how is this done? I see the examples in fulcro-rad-demo, but I can't find the queries behind it. It is a bit trickier than to just list the columns from the other tables. But there seem to be no join queries in the demo.

tony.kay16:06:59

@zilti Pathom resolvers. You just need to make sure there is a resolver that can go from the PK of a table row to the target data you want to include

tony.kay16:06:54

say you had :person/id as the row pk, and a resolver that could go from that as an input to their primary address: in is :person/id, out is :address/id. Then you can include any address column on the row and it will auto-resolve.

tony.kay16:06:48

You can also use query-inclusion to add other ID’s to the query that you might need in things like controls (i.e. you might want to trigger an edit on that address)

zilti16:06:47

Oh, yes, I found he resolver. So I don't specifically have to tell Fulcro RAD about it, it just looks it up in the registered resolvers, correct?

tony.kay16:06:38

that’s how pathom works, yes

tony.kay16:06:18

RAD report knows nothing about the back-end…you just declare attributes. If you list them as cols in a report, it’ll query the server for them, and assume you know what you’re doing

zilti16:06:59

Seems to be a bit of a bold assumption in my case 😅

tony.kay16:06:29

that’s the main power of pathom, though: that you can evolve the graph like that

Joe R. Smith18:06:27

Is there an analog to ok-action for mutations in Fulcro 2? I'm trying to kick off a mutation after a mutation returns using some values from the first mutation in the second and trying to avoid a trip through the component tree (more specifically, I'm calling a one remote to acquire an upload url which I want to follow with a call to another remote to upload to that url).

tony.kay20:06:47

@solussd see fulcro incubator in legacy