@noeldemartin re: https://www.youtube.com/watch?v=ghGmveKKe5Y
How does that library play with say https://standardschema.dev/ for data validation? Does .all() / .read() through if the object is not conforming to schema?
Discussion
@noeldemartin re: https://www.youtube.com/watch?v=ghGmveKKe5Y
How does that library play with say https://standardschema.dev/ for data validation? Does .all() / .read() through if the object is not conforming to schema?
@noeldemartin could also be useful to separate the object model & data validation from the "repository" that stores the data, as that'd then allow non-solid but still RDF/JSON-LD applications to use the models, with a custom repository for whatever they need to do (e.g., activitypub)
@thisismissem The current implementation is a bit naive, but the idea is that when some document doesn't conform it will throw an error yes.
When I built this library, Zod didn't exist, but if I had to rebuild it now I would probably just use Zod for defining the schema.
@thisismissem And technically, the repository is already decoupled from the storage by changing the engine. For example, there is an IndexedDBEngine that stores data locally, and a SolidEngine that stores data in a POD. I guess you could potentially implement an ActivityPubEngine as well. You just have to implement this interface: https://github.com/NoelDeMartin/soukai/blob/main/packages/soukai/src/engines/Engine.ts
A space for Bonfire maintainers and contributors to communicate