Closed acobster closed 8 months ago
Pragmatically, we don't even necessarily have to do all this on ::bread/init
. That can be an optimization that comes later. But as a first pass, we can still parse the query and run inference in a cleaner, more holistic way by leveraging libraries like Meander and Specter.
The important insight here is that routes and other data underpinning queries come from the components themselves. Just from reading the components and combining them with the concrete routing table, we have everything we need to build:
Query inference is currently very ad-hoc and error prone. Lots of opinions sneak their way in, such as supporting only map-style Datalog queries, or the assumption that a namespaced keyword is a db attr (and not just a normal keyword in a
:query/key
).What if we:
::bread/init
hookA simple example