Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
43a00fc
bump version to 2025.02 (#259)
renetapopova Feb 5, 2025
6186dc0
Replace 51N27 parameter name item with component (#260)
renetapopova Feb 10, 2025
3b7bf56
Change parameters of 22N14 (#261)
Lojjs Feb 10, 2025
d33d0c6
Update changelog (#263)
NataliaIvakina Feb 17, 2025
3e824e4
Remove labels `Introduced in 5.x` (#266)
NataliaIvakina Feb 19, 2025
64364b6
Dev parameters hover over (#268)
renetapopova Feb 25, 2025
2abb708
Document errors implemented in 2025.02 (#270)
renetapopova Feb 28, 2025
c5d9a86
Update dev version to 2025.03 (#274)
renetapopova Feb 28, 2025
2032e58
Remove 42002 (#278)
hvub Mar 17, 2025
05e53e6
Typo causing broken link (#280)
lidiazuin Mar 19, 2025
4f241fa
Add 50N23 for failed Call In Transactions retry (#276)
alexfoxgill Mar 19, 2025
e35b366
Update docs-pr-checks.yml (#281)
recrwplay Mar 19, 2025
ed4842d
Add examples to the glossary descriptions (#275)
renetapopova Mar 24, 2025
8c72b5d
Document errors implemented in 2025.03 (#284)
renetapopova Mar 24, 2025
7edd9c9
Update conditions and messages of 22N51, 42N00, 42N11, 25N05, 42N39, …
NataliaIvakina Mar 24, 2025
a174b33
Update the version to 2025.04 (#290)
NataliaIvakina Mar 28, 2025
f99aaa5
New Error - Vector coordinate type (#279)
gem-neo4j Mar 31, 2025
ad88e7f
id() changed to a feature deprecated with replacement and move unsupp…
renetapopova Mar 31, 2025
7205b56
Change parameter serverName to server (#287)
Lojjs Mar 31, 2025
5033936
Update message of 2DN01 (#288)
Lojjs Mar 31, 2025
cc5f8c0
Error missing in the content-nav (#294)
lidiazuin Apr 10, 2025
16559ba
Fix a wrong title for 52N28 (#296)
renetapopova Apr 10, 2025
ba5cc44
Add errors implemented in 2025.04 (#299)
NataliaIvakina Apr 28, 2025
f42d50b
Add errors implemented in the code (#304)
NataliaIvakina Apr 30, 2025
6015f84
Update version to 2025.05 (#306)
renetapopova Apr 30, 2025
41a47ad
Change parameter of 42N11 to a list. (#300)
Lojjs May 1, 2025
93f19db
Final surface codes (#301)
JoelBergstrand May 1, 2025
dc6b4b3
Generate gql-errors index.adoc file (#302)
renetapopova May 6, 2025
51b4a9e
Update the scripts readme (#310)
renetapopova May 6, 2025
240409c
Document new GQLSTATUS 22NB9 (#303)
Lojjs May 8, 2025
1abaa32
Fix a heading mistake and the index generation message (#314)
renetapopova May 9, 2025
8d6c26d
Add some missing glossary entries and fix 42I14 (#317)
renetapopova May 19, 2025
0cf19ec
Update the readme file (#318)
renetapopova May 19, 2025
e68d6af
Add a note that error messages are deprecated (#313)
renetapopova May 19, 2025
055a4cc
"or an application-generated id" -> "or consider using an application…
hvub May 27, 2025
d5829c6
Add 52N40 and 52N41 (#321)
nick-giles-neo May 27, 2025
05e5ecc
Update version to 2025.06 (#337)
renetapopova Jun 3, 2025
e869062
Remove old Neo4j statuses. (#291)
Lojjs Jun 5, 2025
e181f58
Update 51N31 to not use <<item>> (#328)
Hunterness Jun 5, 2025
3b19ee9
Add new GQLSTATUS 22NBA (#329)
Lojjs Jun 5, 2025
6aca200
Fix error message so it makes sense (#335)
ConorNeo Jun 5, 2025
44320be
Extend 51N41 with reason (#342)
gfx54b Jun 16, 2025
bc5ce3c
Add 22NBC (#343)
sherfert Jun 16, 2025
984cb3f
Clarify that 42NA8 might show sub-commands (#348)
Lojjs Jun 30, 2025
4f7202f
Dev merge cypher25 (#353)
renetapopova Jul 2, 2025
25510f2
New Error - Distance metric (#345)
gem-neo4j Jul 2, 2025
cdd8acc
Errors and deprecations for graph references (#340)
Lojjs Jul 2, 2025
854eb8f
remove a leftover category (#355)
renetapopova Jul 2, 2025
d349f72
update version to 2025.07 (#357)
renetapopova Jul 2, 2025
e4264f5
Added 42I64 - unsupported aggregation (#359)
JoelBergstrand Jul 8, 2025
c524105
Adding 42I63 wrong clause order (#347)
JoelBergstrand Jul 8, 2025
308f658
Add 51N77 (#346)
sherfert Jul 8, 2025
1bde802
Add new GQLSTATUS codes 22NAA and 22NAB (#349)
Lojjs Jul 9, 2025
fdb9faf
Update 22N69 and 22N71 to have more consistent wording when compared …
Hunterness Jul 9, 2025
d21eb4f
42I64 - Unsupported operation (#360)
JoelBergstrand Jul 22, 2025
9e6463e
Update 51N52 and 51N53 to work for both alter and create (#344)
OliviaYtterbrink Jul 22, 2025
7d27904
Regenerate index file (#363)
renetapopova Jul 22, 2025
5a80b14
Update to 2025.08 (#365)
NataliaIvakina Jul 31, 2025
ebe7c23
Error 51N77 missing from content nav causing broken link (#368)
lidiazuin Aug 7, 2025
8456995
Introduce 22NBD - Unsupported Struct (#371)
gjmwoods Aug 22, 2025
2b63c9d
Bump to 2025.09 (#379)
NataliaIvakina Sep 2, 2025
0d91957
Update workflows to v2 (#372)
recrwplay Sep 8, 2025
5a31a72
Error codes: 42I65 and 42I66 (#375)
JoelBergstrand Sep 9, 2025
1cd7349
Added error code 42I67 unsupported language feature (#381)
JoelBergstrand Sep 9, 2025
5dc3cef
Update deprecation message for legacy text index providers. (#370)
MishaDemianenko Sep 9, 2025
230b1d5
Add 22NBE and 22NBF (#374)
sherfert Sep 10, 2025
be4de65
Introduces GQLSTATUS 22N60 (#382)
bigmontz Sep 11, 2025
b1a5f0a
Update version to 2025.10 (#387)
renetapopova Sep 29, 2025
ff5cbb2
Adding 42I68, mismatched pattern, 53N33 function invocation failed (#…
JoelBergstrand Oct 8, 2025
0d4d229
add new notification (#388)
OliviaYtterbrink Oct 21, 2025
67d0942
added oidc credential forwarding not enabled notification (#391)
evelinadanielsson Oct 28, 2025
f70803b
Add error code for operations that require implicit transaction (#385)
pontusmelke Oct 29, 2025
d5df685
Update the version to 2025.11 (#404)
renetapopova Oct 30, 2025
57ceb3d
Add notification warning for vector on incompatible client (#392)
gjmwoods Oct 30, 2025
182a56a
Extend 52N11/17 with message (#393)
gfx54b Oct 30, 2025
8af5aba
Add `50N24` and `50N25` (#396)
jackwaudby Oct 30, 2025
798f0d3
Add 42NAB (#397)
hvub Oct 30, 2025
325d78f
Additional errors for 42NAC, 50N26, 51N7A (#398)
mnd999 Oct 30, 2025
75b37fe
Add errors for unsupported combinations with path modes (#399)
dogofbrian Nov 4, 2025
3354df6
Add new code for commands not allowed with auth disabled (#405)
Hunterness Nov 6, 2025
bc301e2
Add new error code for having a use clause with admin commands (#402)
OliviaYtterbrink Nov 10, 2025
31f97e9
Added examples of notifications connected to deprecated namespaces (#…
JoelBergstrand Nov 10, 2025
aff6a7f
Add 22G0I
loveleif Nov 10, 2025
5918082
Add AUTH RULE notifications (#409)
l-heemann Nov 17, 2025
5271a67
Remove all introduced in and changed in labels (#414)
renetapopova Nov 18, 2025
14dd285
Remove which (#419)
renetapopova Nov 18, 2025
38f742d
Add changed in label on the level of the description (#418)
renetapopova Nov 19, 2025
7b081c7
Fix a typo (#422)
renetapopova Nov 20, 2025
1298a9f
Errors for Graph Type (#341)
mnd999 Nov 26, 2025
d40e248
Update the changelog page (#415)
renetapopova Nov 27, 2025
ec3e69c
adding error codes for ABAC metadata function (#390)
phil198 Dec 8, 2025
ec11b3d
Add 22ND1 and 22ND2 (#412)
l-heemann Dec 8, 2025
de22f12
Add 42NAD and 42NAE (#413)
HannesSandberg Dec 11, 2025
d186c97
Rephrase status description of 42I67. (#427)
Lojjs Dec 15, 2025
36ee635
Update antora.yml to 2025.12 (#433)
NataliaIvakina Dec 22, 2025
846c45b
Update the version number to 2026.01 (#436)
NataliaIvakina Jan 16, 2026
f639c62
Add new GQLSTATUS codes for search (#408)
Lojjs Jan 16, 2026
ce30241
22NAC, 22NAD and 22NAE for LOAD CSV (#428)
fastlag Jan 16, 2026
b89ecda
Update notifications around Importing WITH and variable scope clauses…
Lojjs Jan 16, 2026
b2e99dc
Adding missing codes to the index file (#438)
renetapopova Jan 19, 2026
ba31e6d
fix the title of 25N14 to 25N15 (#439)
renetapopova Jan 20, 2026
2c1cb46
remove the note about errors being unstable (#441)
renetapopova Jan 21, 2026
d3f1564
Introduce `Neo.ClientNotification.Request.FeatureDeprecationWarning` …
bigmontz Jan 26, 2026
cc78be3
Add index name to 51N63 (#445)
inmost-light Jan 27, 2026
008cd1a
Add 42I76 (#437)
parnmatt Jan 27, 2026
732ffca
Update documentation to reflect description of GQL error 22N31 (#448)
neo-harshg Jan 28, 2026
6eacd9b
DOCS-279 Update version number to 2026.02 (#453)
renetapopova Feb 4, 2026
cd6ab77
Document new error codes for vector search filtering. (#434)
Lojjs Feb 6, 2026
8e0dad9
SURF-537 Update documentation for type mismatch errors (#450)
neo-harshg Feb 10, 2026
8669a70
Update page for 51N65 (#451)
Lojjs Feb 11, 2026
29d8e0d
Regenerate index file (#458)
renetapopova Feb 11, 2026
11aa690
Update status description of 42I73 (#457)
Lojjs Feb 11, 2026
e016a00
Change copyright: 2025 to copyright: 2026 (#456)
renetapopova Feb 11, 2026
d53735f
Add information about the tools/docs and driver output (#465)
renetapopova Feb 23, 2026
44dc902
Update the version to 2026.03 (#469)
renetapopova Mar 6, 2026
9edebab
Fix the version 2026.03 (#471)
NataliaIvakina Mar 9, 2026
4d55900
Update 42NA9 to reflect code updates (#463)
Hunterness Mar 17, 2026
e2f05c7
Update the version to 2026.04 (#478)
renetapopova Apr 2, 2026
a881393
Update the GQL message of 42N35 (#474)
WilcoNeo Apr 22, 2026
8eb46c7
Update status description of 42N81. (#479)
Lojjs Apr 22, 2026
996bf7e
add status code 42NAM (#480)
HannesSandberg Apr 22, 2026
e1dceb2
update version to 2026.05 (#488)
renetapopova Apr 23, 2026
30fc41c
Reworded 42I18 (#489)
JoelBergstrand Apr 28, 2026
4317b09
Added updated message for 42N25 and 42N50 and example (#481)
JoelBergstrand May 6, 2026
ab2a268
Update the workflows (#491)
renetapopova May 7, 2026
7a2d99d
Dev vector index dimensions warning (#482)
mauvo May 7, 2026
afc0fc1
Update title to Vector index dimensions not specified (#494)
renetapopova May 7, 2026
c2af91c
Missing error code in the content-nav (#490)
lidiazuin May 7, 2026
4f55bd0
SURF-893: Add new error cause in case of proc/func not found in Cyph…
gem-neo4j May 18, 2026
4c11c3d
Update the version to 2026.06 (#501)
renetapopova May 29, 2026
ce90072
Add GQL error codes 42N7A, 42N7B, 42N7C for DISJOINT BY (#502)
henriknyman Jun 12, 2026
2f081ca
Add notification 01V00 (#499)
loveleif Jun 24, 2026
907960d
WHERE clause combined with procedure call is allowed on the system da…
renetapopova Jun 25, 2026
f43e1d0
update the version to 2026.07 (#515)
renetapopova Jul 8, 2026
14e1158
Introduces 42I79 (#504)
JoelBergstrand Jul 8, 2026
4407d36
Updated 42N44 (#506)
JoelBergstrand Jul 8, 2026
3e59335
Added deprecation notifications from CIP 248 (#511)
JoelBergstrand Jul 8, 2026
2f766a1
Introduces 42I80 invalid grouping element (#508)
JoelBergstrand Jul 8, 2026
68063bc
SURF-1165 related documentation of error codes (#516)
hvub Jul 9, 2026
6c2c75e
Check and clean up the examples, and add error chains (#505)
renetapopova Jul 9, 2026
22458f5
DOCOPS-160 Harden docs-deploy-surge.yml against artifact poisoning (s…
recrwplay Jul 21, 2026
6a801c1
SURF-1206: Add error for trim specification misspelling (#518)
gem-neo4j Jul 22, 2026
a291930
DOCOPS-176 Add page-tabs attributes to publish playbook (#521)
recrwplay Jul 31, 2026
0425b43
Publish release 2026.07
NataliaIvakina Aug 5, 2026
5b01bd8
Apply suggestion from @NataliaIvakina
NataliaIvakina Aug 5, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 44 additions & 5 deletions .github/workflows/docs-deploy-surge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
- completed

jobs:
# [Optional] Restrict automatic dpeloyment to PRs from the upstream repo
# [Optional] Restrict automatic deployment to PRs from the upstream repo
# For fork PRs, requires manual approval via the "preview" environment.
# For PRs from the main repository this job is skipped and deploy-docs runs immediately.
# Setup: create a "preview" environment in Settings → Environments with required reviewers.
Expand Down Expand Up @@ -56,7 +56,7 @@ jobs:
var artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: ${{ env.RUN_ID }},
run_id: process.env.RUN_ID,
});

var matchArtifactDocs = artifacts.data.artifacts.filter((artifact) => {
Expand Down Expand Up @@ -86,13 +86,32 @@ jobs:

- id: suspicious-path-check
name: Suspicious paths check
shell: bash
env:
ARTIFACT_DIR: ${{ runner.temp }}/artifacts/docs
run: |
set -euo pipefail
cd "$ARTIFACT_DIR"
if unzip -l docs.zip | grep -q "\.\./"; then

mapfile -t ZIP_ENTRIES < <(zipinfo -1 docs.zip)
if [ "${#ZIP_ENTRIES[@]}" -eq 0 ]; then
echo "docs.zip is empty"
exit 1
fi
for entry in "${ZIP_ENTRIES[@]}"; do
if [[ "$entry" =~ ^/ ]]; then
echo "Blocked absolute path in artifact: $entry"
exit 1
fi
if [[ "$entry" =~ (^|/)\.\.(/|$) ]]; then
echo "Blocked path traversal in artifact: $entry"
exit 1
fi
if [[ "$entry" == *\\* ]]; then
echo "Blocked Windows-style path separator in artifact: $entry"
exit 1
fi
done

- id: hidden-files-check
name: Hidden files check
Expand Down Expand Up @@ -132,6 +151,26 @@ jobs:
cd "$ARTIFACT_DIR"
unzip changelog.zip

# The changelog file is built from untrusted PR content and its contents
# are posted to the PR as a comment. A malicious artifact could make
# `changelog` a symlink pointing at an arbitrary file the runner can read,
# turning the comment step into an arbitrary-file-read. Reject anything
# that isn't a plain regular file before we read it.
- id: validate-changelog
name: Validate changelog is a regular file
if: ${{ steps.find-changelog.outputs.has-changelog == 'true' }}
env:
CHANGELOG_FILE: ${{ runner.temp }}/artifacts/changelog/changelog
run: |
if [ -L "$CHANGELOG_FILE" ]; then
echo "Security Alert: changelog is a symlink — refusing!"
exit 1
fi
if [ ! -f "$CHANGELOG_FILE" ]; then
echo "changelog missing or not a regular file"
exit 1
fi

- id: get-deploy-id
name: Get deploy ID
env:
Expand All @@ -150,7 +189,7 @@ jobs:
run: |
deployurl=$ORG-$REPO-$DEPLOYID.surge.sh
echo "deploy-url=$deployurl" >> $GITHUB_OUTPUT

- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: lts/*
Expand All @@ -165,7 +204,7 @@ jobs:
mkdir -p "$DOCS_DEPLOY_DIR"
# Copy only the built docs into a clean directory for deployment
cp -R "$DOCS_SRC_DIR"/. "$DOCS_DEPLOY_DIR"/

- id: surge-deploy
name: Deploy docs to surge
shell: bash
Expand Down
8 changes: 4 additions & 4 deletions antora.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: status-codes
title: Status Codes for Errors & Notifications
version: '2026.06'
version: '2026.07'
start_page: ROOT:index.adoc
nav:
- modules/ROOT/content-nav.adoc
asciidoc:
attributes:
page-origin-private: false
neo4j-version: '2026.06'
neo4j-version-exact: '2026.06.0'
neo4j-buildnumber: '2026.06'
neo4j-version: '2026.07'
neo4j-version-exact: '2026.07.0'
neo4j-buildnumber: '2026.07'
5 changes: 5 additions & 0 deletions modules/ROOT/content-nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
**** xref:errors/gql-errors/22015.adoc[]
**** xref:errors/gql-errors/22G03.adoc[]
**** xref:errors/gql-errors/22G05.adoc[]
**** xref:errors/gql-errors/22G06.adoc[]
**** xref:errors/gql-errors/22G08.adoc[]
**** xref:errors/gql-errors/22G0I.adoc[]
**** xref:errors/gql-errors/22N00.adoc[]
**** xref:errors/gql-errors/22N01.adoc[]
Expand Down Expand Up @@ -299,6 +301,8 @@
**** xref:errors/gql-errors/42I74.adoc[]
**** xref:errors/gql-errors/42I75.adoc[]
**** xref:errors/gql-errors/42I78.adoc[]
**** xref:errors/gql-errors/42I79.adoc[]
**** xref:errors/gql-errors/42I80.adoc[]
**** xref:errors/gql-errors/42N00.adoc[]
**** xref:errors/gql-errors/42N01.adoc[]
**** xref:errors/gql-errors/42N02.adoc[]
Expand Down Expand Up @@ -416,6 +420,7 @@
**** xref:errors/gql-errors/42NAD.adoc[]
**** xref:errors/gql-errors/42NAE.adoc[]
**** xref:errors/gql-errors/42NAM.adoc[]
**** xref:errors/gql-errors/42NAP.adoc[]
**** xref:errors/gql-errors/42NFC.adoc[]
**** xref:errors/gql-errors/42NFD.adoc[]
**** xref:errors/gql-errors/42NFE.adoc[]
Expand Down
20 changes: 20 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/22G06.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
= 22G06


== Status description
error: data exception - invalid date, time, or datetime function field value

== Scenario

A temporal field, such as `year`, `day`, `hour`, `minute`, in the map provided argument of one of the temporal functions `date()`, `time()`, `localtime()`, `datetime()`, `localdatetime()` has an invalid value.

== Possible solution

Adjust the value.

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
20 changes: 20 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/22G08.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
= 22G08


== Status description
error: data exception - invalid duration function field value

== Scenario

A temporal field, such as `years`, `days`, `hours`, `minutes`, in the map provided argument of one of the temporal functions `duration()` has an invalid value.

== Possible solution

Adjust the value.

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
26 changes: 26 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/22N03.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,32 @@
== Status description
error: data exception - specified numeric value out of range. Expected `{ <<component>> }` to be of type `{ <<valueType>> }` and in the range `{ <<lower>> }` to `{ <<upper>> }` but found `{ <<value>> }`.

== Example scenario

Try providing a value of `1005` for the `millisecond` field:

[source,cypher]
----
RETURN time({hour: 1, minute: 1, second: 1, millisecond: 1005});
----

The query returns a chain of errors where GQLSTATUS 22N03 is the cause of GQLSTATUS xref:errors/gql-errors/22007.adoc[22007]:

.GQLSTATUS error chain
[source, error]
----
22N03: data exception - specified numeric value out of range. Expected 'Millisecond' to be of type INTEGER and in the range 0 to 999 but found 1005.
22007: data exception - invalid date, time, or datetime format
----

== Possible solution

Provide an integer value in the valid range for the `millisecond` field:

[source,cypher]
----
RETURN time({hour: 1, minute: 1, second: 2, millisecond: 5});
----

ifndef::backend-pdf[]
[discrete.glossary]
Expand Down
28 changes: 28 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/22N40.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,34 @@
== Status description
error: data exception - non-assignable temporal component. Cannot assign `{ <<component>> }` of a `{ <<valueType>> }`.

== Example scenario

Try providing a string value for the `minute` field:

[source,cypher]
----
RETURN time({hour: 10, minute: '20', second: 23});
----

The query returns a chain of errors where GQLSTATUS 22N40 is the cause of GQLSTATUS xref:errors/gql-errors/22G06.adoc[22G06]:

.GQLSTATUS error chain
[source, error]
----
22N40: data exception - non-assignable temporal component. Cannot assign 'minute' of a STRING.
22G06: data exception - invalid date, time, or datetime function field value
----

== Possible solution

Provide an integer value for the `minute` field

[source,cypher]
----
RETURN time({hour: 10, minute: 20, second: 23});
----


ifndef::backend-pdf[]
[discrete.glossary]
== Glossary
Expand Down
73 changes: 73 additions & 0 deletions modules/ROOT/pages/errors/gql-errors/42I79.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
= 42I79

== Status description
error: syntax error or access rule violation - invalid reference in subclause expression. Aggregation in subclause expression is not allowed to reference variables declared in the same clause `{ <<argList>> }`.

== Explanation
A subclause expression is an expression used in a subclause (e.g., `WHERE` or `ORDER BY`) that belongs to a projection clause.
If that expression is aggregating, it is not allowed to reference aliases introduced in the same projection clause; only variables incoming to the clause are allowed.

== Example scenario
Try sorting by an aggregation over a variable that the same `RETURN` clause introduces:

.Aggregates over parity, which is declared in the same clause
[source,cypher]
----
UNWIND [1, 2, 3, 4] AS x
RETURN x % 2 AS parity, sum(x) AS total
ORDER BY sum(parity);
----

`sum(parity)` is an aggregation, and `parity` is introduced by the same `RETURN` clause.

The query returns a chain of errors where GQLSTATUS 42I79 is the cause of GQLSTATUS xref:errors/gql-errors/42001.adoc[42001]:

.GQLSTATUS error chain
[source, error]

----
42I79: syntax error or access rule violation - invalid reference in subclause expression. Aggregation in subclause expression is not allowed to reference variables declared in the same clause: `parity`. (line 3, column 12 (offset: 76))
" ORDER BY sum(parity)"
^
42001: syntax error or access rule violation - invalid syntax
----

== Possible solutions

To resolve this issue, aggregate over the underlying incoming expression instead of the same-clause alias:

.Aggregates over the underlying expression x % 2
[source,cypher]
----
UNWIND [1, 2, 3, 4] AS x
RETURN x % 2 AS parity, sum(x) AS total
ORDER BY sum(x % 2);
----

Alternatively, compute the value in a preceding clause so it is an incoming variable rather than one declared in the same clause:

.Introduces parity in an earlier clause
[source,cypher]
----
UNWIND [1, 2, 3, 4] AS x
LET parity = x % 2
RETURN parity, sum(x) AS total
ORDER BY sum(parity);
----

If the aggregation is meant to reuse a value already projected by the clause, reference that return item by its alias without re-aggregating it:

.Sorts by the existing total aggregation
[source,cypher]
----
UNWIND [1, 2, 3, 4] AS x
RETURN x % 2 AS parity, sum(x) AS total
ORDER BY total;
----

ifndef::backend-pdf[]
[discrete.glossary]
== Glossary

include::partial$glossary.adoc[]
endif::[]
Loading