Fork me on GitHub
#fulcro
<
2017-12-16
>
tony.kay00:12:23

@wilkerlucio AH, your error on params. It works because it continues threading through that cond here: https://github.com/fulcrologic/fulcro/blob/develop/src/main/fulcro/client/impl/data_fetch.cljc#L301 The validation check and the prior thing can probably be dropped…depending on how much we want ppl to be able to safely use the underlying load mutation directly

tony.kay00:12:37

I’ll probably just remove the validation check. Could be some legacy use hanging around for the params placement

tony.kay00:12:52

RC3-SNAPSHOT on clojars without that validation.

thosmos14:12:25

Datomic now has the ability to alias fields in pull statements, which Graphql also has. Any thoughts on implementing this in Fulcro?

tony.kay14:12:15

@thosmos What, you mean internally in Fulcro’s query engine?

thosmos14:12:42

purely theoretical question, I have no need for it personally

tony.kay14:12:31

Not sure what the point would be, and it would add overhead, so I have no current plan. Don’t add things unless there is a compelling need. Anyone can add a local read routine to the engine with runtime options and make the query system do whatever.

pmaes16:12:54

Hi! I’m evaluating Fulcro for an application that would be fully client-side with a PouchDB storage layer. I’m tempted to (mis)use the remote comms for this, with a faux back-end that manages interaction with PouchDB running alongside the client in the browser. I’d appreciate an opinion on how much of an abomination this is, and perhaps a more idiomatic way to handle this (fit the PouchDB in the root node?)

tony.kay18:12:30

@pmaes I think it is a perfectly valid use-case. You could also plug into the read-local system and provide a custom query parser that pulls data from alternate client dbs.

tony.kay18:12:45

The local read story can be completely customized that way. The primary thing will be to hook in so that external changes to the database cause re-renders, but that’s easy.

tony.kay18:12:46

Depends on if you want to feed the entire UI that way (where you’d have to store UI specific details in the external db). The remote option gives you better support for things like support viewer and such.

tony.kay18:12:43

I’d probably lean towards the remote case. On incoming changes (from say a server), use things like merge! to push changes into the UI. If it is completely local, not sure why you need an external db at all…just adds more complications. The current db is trivially serializable for offline operation.

tony.kay18:12:55

and the CQRS structure of the system makes sync’ing later also equally nice. Personally, I wouldn’t pull in PouchDB unless the point was to sync to couchdb.

pmaes19:12:32

@tony.kay The constraint is indeed to integrate with a couchdb system. I'd only use it to store and sync the business domain documents, with the regular Fulcro db still feeding the UI. It's this separation that led me to the idea of acting as if PouchDB is behind a remote. I'll have a look at read-local, it sounds as if that would be a cleaner solution should an actual remote enter the picture as well. Thanks for the elaborate response (on top of all the work you do)!

tony.kay20:12:48

@pmaes See the ReferenceGuide.adoc in stale-docs in the main repo. There is a section on this…I just have not had time to update that doc.

tony.kay20:12:40

so much documentation to update for 2.0…the getting started guide is next in my sights

wilkerlucio23:12:17

@thosmos hey, I got curious by that, can you tell where I can read more about it?

wilkerlucio23:12:17

sound interesting, but at same time, thinking about adding this to fulcro story sounds like a hell of work prone to many issues