Closed micheleriva closed 2 years ago
Can I pick this up? I promise nothing since I never looked at the source code but I would like to try it
Go for it 🙂
Schema type is not propagated throughout Lyra instance. Is this a design choice?
What do you mean by that?
I mean when I create an instance with a specific schema like that:
const db = new Lyra({ schema: { quote: "string", author: "string" }});
The insert method does not inherit the type from the schema passed So If I do:
await db.insert({ nonExistingField: "A_RANDOM_STRING"});
I will get INVALID_DOC_SCHEMA, This error is only raised at runtime, but at compile time it is not detected.
@DanieleFedeli got it, this is a missing feature that I'd definitely love to have!
I can work on that also, but now I am focusing on this one 😆
Is your feature request related to a problem? Please describe. As for now, Lyra does not support nested properties. Thus, the following code will break:
We should grant support for nested properties to Lyra