Open Ansis100 opened 1 year ago
That's true, but it's a bit difficult to type properly for nested relationships with where
. I'll have a fresh look though.
Until then, you can use the satisfies
keyword to add some inline type safety, like:
where: {
name: 'Jason'
} satisfies Partial<UserProperties>
https://github.com/themetalfleece/neogma/blob/da28eccb3221476d5d7693be65f84297d8ea0532/src/Queries/Where/Where.ts#L109-L116
The key of
WhereParamsI
is astring
type. This can cause errors that are difficult to debug. For example:If the model of user groups has a property called
groupName
then this will fail only at runtime whenfindRelationships
returns zero results.It would be better if the key of
WhereParamsI
were typed to be the keys of the related node properties.