Fork me on GitHub
#fulcro
<
2023-09-19
>
nivekuil01:09:34

are there any downsides to just assuming the rc/nc ident convention everywhere? e.g. normalizing server return values without mut/returning

nivekuil01:09:01

arguably having compound idents, having multiple ident-like keys in a single pathom entity instead of through a join etc. are design mistakes

tony.kay03:09:31

The point is moot. No way to do that without making it a breaking change, and it is easy enough for you to write your own wrappers that standardize on your preferences

tony.kay04:09:52

Also there are definitely cases where others things are needed as idents. Form state. Things that use natural keys with odd names

tony.kay04:09:58

But nc makes it trivial to write wrappers. And you can override the default mutation action globally and augment it as you see fit. There's no real way to automate returning. Returning adds a mutation join query to the outgoing request, which things like path home need in order to figure out what you want to get back.

nivekuil06:09:45

yeah i'm thinking about my own conventions on top of fulcro. I think you can stick server-streamed data under some arbitrary key that you always query for, and then you could merge it in without declaring the shape up front

Jakub Holý (HolyJak)08:09:08

@genekim & Co. I have reworked https://github.com/fulcro-community/FulcroDemos so that it is based on Workspaces and you can “plug in” whatever example you want by simply adding a new _cards namespace. Let’s hope the community will grow it!

genekim23:09:34

This is great, @U0522TWDA ! Got it running in less than 5m — and trying to make my first example. Having to learn how Workspaces works — reading the docs now. Fantastic work! First step — learning whether cards all share the same “ident namespace”.

Jakub Holý (HolyJak)19:09:08

Thx a lot! Pls do not hesitate to suggest improvements to the docs or whatever to make it easier for the next person!

tony.kay18:09:46

Is there anyone that would like a relatively easy contribution to Fulcro? I’ve written most of a json middleware for fulcro http remotes that will let it automatically transform loads/mutations into HTTP GET/PUT/POST/etc. AND auto-normalize the response. It’s working with loads, and I suspect it’s fine for mutations as well, but I am low on time to test it and finish up the helper functions. I feel like this is a missing piece that a lot of beginners would appreciate, since many of the APIs people are used to using (and may already have in production) are JSON-based REST-like things. PM me if interested.

😻 1
Jakub Holý (HolyJak)22:09:35

I very much hope somebody will pick this up. If not, then ping me in a week or two and I’ll see what I could do.

tony.kay18:09:15

The work so far is on the fulcro json-api-remote branch. The ns is com.fulcrologic.fulcro.networking.json-api-middleware https://github.com/fulcrologic/fulcro/issues/546