terary / gabby-query-protocol-lib

Gabby Query Protocol - library
0 stars 0 forks source link

.fromEmpty allows invalid predicate #32

Closed terary closed 2 years ago

terary commented 2 years ago

When building predicateTree.fromEmpty the root, or next to root will accept {operator: '$eq', subjectId: 'submject', value:''}.

This causes an issue when exporting tree to json, then importing into a new tree, because that node is an invalid predicate.

Need to disallow or automatically update node or something.

Should be able to .fromJson(.toJson()). (see tests for react-context, Provider)

terary commented 2 years ago

I think this will inherently be fixed with https://github.com/terary/gabby-query-protocol-lib/tree/issue_20211113

Leaving issue open to check after merge

terary commented 2 years ago

Needs to be verified, fixed or still broken

terary commented 2 years ago

likely fix on branch issues-20211120