Fix the parameterised Lua query example to match the Schema as a label - #1187
Merged
Conversation
The example filtered on a schema node property that does not exist — the Schema is the node's label — so it returned nothing. Cypher parameters cannot supply labels, so the label is written literally and the value stays parameterised. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Filtering with `s.`Valid` = $valid` matched nothing: text, url and select properties project as LIST<STRING>, so the comparison put a list against a string. Returning `s.`Expiry date`` handed back a list of dates, which reaches Lua as a table rather than the ISO 8601 string the property name implies. Verified against a live instance: an `ISMS Document` Subject with `Valid` set to `Yes` returns one row through `nw.query` with `row.expiry` a string, where the previous form returned none. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The parameterised query example filtered on a
schemanode property that does not exist — the Schema is the node'slabel (
:Subject:ISMS Document, see the Graph Model) —so the example returned nothing. Cypher parameters cannot supply labels, so the label is written literally and the
value stays parameterised, which is also the idiomatic shape for real queries.