Fork me on GitHub
#fulcro
<
2017-08-29
>
tony.kay00:08:18

@wilkerlucio When did lein install happen? I’ve been using publish-local plugin for like 2 years

wilkerlucio00:08:04

not sure, I always used that to install deps from source

tony.kay00:08:30

Not sure why that plugin even exists, then 😕

wilkerlucio00:08:43

yup, longer way since lein has a feature for that

gardnervickers00:08:09

@tony.kay Unfortunately I’m still seeing that bug. I don’t think I properly cleaned my environment when testing the patch changing ordering for the event handler. Still tracking it down, I’ll close the PR until I have something.

tony.kay00:08:13

Ah, localrepo is for installing arbitrary jar files…not necessarily ones that you have a project for. I guess I just assumed that was all there was and never looked for a built-in command.

wilkerlucio00:08:15

and hopefully soon we will have the https://github.com/clojure/tools.deps.alpha to solve all of the dependencies things 🙂

tony.kay00:08:04

did you just volunteer to help him 😉?

wilkerlucio00:08:36

help on tool.deps?

tony.kay00:08:52

yeah, confidence in crossing out “hopefully”

wilkerlucio00:08:20

hopefully I mean, we still kind of specting spec to be out, so I think tool.deps might take a while too

wilkerlucio00:08:13

didnt meant to sound convident, just hoful, hehehe

tony.kay00:08:51

welp, time to work on the house. back tomorrow.

wilkerlucio00:08:28

thanks for the support, good house work, cya

ianchow08:08:14

since fulcro-template has been changed to use fulcro.server/fulcro-system instead of fulcro.easy-server/make-easy-server, where do i squirrel in the route for websockets? previously i just added this line in make-easy-server:

liesbeth07:09:12

Ian have you found an answer to this?

denis-v09:08:09

Hi! I'm new to Fulcro (and fairly new to Clojure). I've been through the Getting Started and parts of the devguide, but something is puzzling me. All the examples I've seen have components with just one entity type, such as Person or Phone. But how do you display data for "foreign key" references to other entity types? (For example, a Person may belong to a Company, and :person/company may have a value of [:company/by-id 2]. But I want to display the :company/name instead of its ID.) So can you please point me to any examples that shows how this is done?

cjmurphy10:08:38

@denis-v: Look in any defui in any om/IQuery at the {} - those curly brackets are designating a join. It is all about the 'query syntax', where each query references other queries using get-query.

kauko15:08:59

I have to say, Fulcro-sql seems like such a great tool. One thing that's kind of kept me from Om Next / Fulcro has been that I don't use datomic, and while you could use Fulcro without Datomic, I always felt like you'd lose out if you did

claudiu18:08:19

@kauko Im using fulcro with a mysql database (hugsql for queries). Dont really know about datomic, but compared to graphql its really nice :)

kauko15:08:21

hmm, have you seen specql @tony.kay ? https://github.com/tatut/specql Wondering if there's some way fulcro-sql and specql could be used together

kauko15:08:34

It's pretty cool how it can generate specs from your postgresql databse

gardnervickers16:08:07

@kauko We take advantage of the server side query parser to provide a datomic pull-like API for all of our data sources. It's a good way to handle cross-datastore joins.

tony.kay16:08:12

@kauko I’m not sure how they’d be used together per se. fulcro-sql is strictly about providing the pull API that is handy in Datomic when working with Om Next. It requires very little overhead in terms of config, since you just configure the parts of the schema you want to pull from (which you can amortize over app development as you need new queries) It has a similar goal, and we have the same opinion to use something more advanced (like hugsql) for reporting queries that don’t mimic your schema. What @gardnervickers said is also true. There is a parser that lets you piece together your data from disparate data sources.

cjmurphy16:08:16

Is there an example of specifying a :seed-function in the configuration .edn file?

cjmurphy16:08:21

I would just put it in myself. I guess I could do that in a Stuart Sierra component that used :config, and so could get at and thus alter the contents of the config. Not sure how to go about this...

cjmurphy16:08:51

A datomic database.

tony.kay16:08:57

The config component just reads EDN. You inject it into whatever component needs the data.

cjmurphy16:08:36

I've never put a function in edn.

tony.kay16:08:42

no, not functions

tony.kay16:08:16

though functions can appear as just data…but resolving them is another issue

tony.kay16:08:27

unless you’re writing a dbfn, in which case datomic can deal with that

cjmurphy16:08:40

In the source code it is definitely getting a function at :seed-function.

tony.kay16:08:42

I have a call in 5 mins, so I no time to explain in detail. If you come up with a more concrete example of what you’d like to do and throw it in a gist I’ll comment on it in an hour or so.

cjmurphy16:08:02

np - I think I'll seed a way I understand. Also it is late here so I'll be asleep soon.

tony.kay18:08:08

fulcro 1.0.0-beta9-SNAPSHOT updated. There was a bug in dynamic router that is fixed now. It was keeping the query from updating properly.

tony.kay20:08:06

Just pushed a release of fulcro and fulcro-spec. A number of bug fixes, and demos for the new fulcro-sql query library.

roklenarcic21:08:35

I successfully implemented that search box I was making yesterday

roklenarcic21:08:27

only one wrinkle: each time a load is triggered (such as a person adding another letter to search term), the whole list disappears, and it appears with results half a second later

roklenarcic21:08:55

is there a way to prevent a load from destroying previous list while it's executing?

tony.kay21:08:56

yes, turn off load markers (option on load). You could also target the load to an alternate field and use a post-mutation to copy it over.

roklenarcic21:08:23

how do I turn off load markers?

tony.kay21:08:34

don’t remember the keyword. It is on the docstring of load

roklenarcic21:08:14

I can see the docs are quite extensive

tony.kay21:08:35

yep. Trying to make it as self-serve as possible

tony.kay21:08:16

Did you find the autocomplete demo?

tony.kay21:08:23

it uses the alternate target method

roklenarcic21:08:20

Haven't looked at it yet

tony.kay21:08:07

The demos (runnable from a clone of fulcro) can be handy references for common tasks.