Skip to content

Fix the parameterised Lua query example to match the Schema as a label - #1187

Merged
alistair3149 merged 3 commits into
masterfrom
docs/lua-schema-label-example
Jul 27, 2026
Merged

Fix the parameterised Lua query example to match the Schema as a label#1187
alistair3149 merged 3 commits into
masterfrom
docs/lua-schema-label-example

Conversation

@JeroenDeDauw

Copy link
Copy Markdown
Member

The parameterised query example filtered on a schema node property that does not exist — the Schema is the node's
label (: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.

AI-authored — Claude Code, Fable 5 (max); pre-existing doc bug surfaced during an AI review round on #1185, fix requested by @JeroenDeDauw, no revisions; not yet human-reviewed; corrected query verified against the documented graph model.

JeroenDeDauw and others added 2 commits July 26, 2026 22:56
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>
@JeroenDeDauw
JeroenDeDauw marked this pull request as ready for review July 26, 2026 21:10
@alistair3149 alistair3149 self-assigned this Jul 27, 2026
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>
@alistair3149
alistair3149 merged commit 9fa63b0 into master Jul 27, 2026
6 checks passed
@alistair3149 alistair3149 removed their assignment Jul 27, 2026
@alistair3149
alistair3149 deleted the docs/lua-schema-label-example branch July 27, 2026 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants