42NAA
Status description
error: syntax error or access rule violation - incorrectly formatted graph reference. Incorrectly formatted graph reference { $input }
. Expected a single quoted or unquoted identifier. Separate name parts should not be quoted individually.
Explanation
As of Cypher 25, database names and aliases cannot include name parts that are quoted individually. Either the whole name must be quoted, or the whole name must be unquoted. A recommended approach, which is consistent between different commands and Cypher versions, is to send in the database name or alias as a parameter rather than a string literal.
Example scenario
For example, try to create a database with using the following Cypher 25 command:
CYPHER 25 CREATE ALIAS `foo`.`bar` FOR DATABASE baz
An error will be thrown with GQLSTATUS 42NAA and the following status description:
error: syntax error or access rule violation - incorrectly formatted graph reference. Incorrectly formatted graph reference '`foo`.`bar`'. Expected a single quoted or unquoted identifier. Separate name parts should not be quoted individually.
Possible solutions
To resolve this issue, the preferred way is to replace the alias name with a parameter:
{
"aliasName": "foo.bar"
}
CREATE ALIAS $aliasName FOR DATABASE baz
Alternatively, if you use a string literal, the correct quoting for Cypher 25 will either be
CYPHER 25 CREATE ALIAS `foo.bar` FOR DATABASE baz
or
CYPHER 25 CREATE ALIAS foo.bar FOR DATABASE baz
Glossary
- $action
-
Freeform description of an action.
- $alias
-
An alias name,
mydb-alias
. - $aliasList
-
A list of alias names, for example,
mydb-alias1, mydb-alias2
. - $allocType
-
Allocation type (
primary
orsecondary
). - $arg
-
Procedure or function argument, for example,
database
,pause
,dryrun
, etc. - $argType
-
Argument type, either input or output.
- $auth
-
Auth provider name, for example,
ldap
,native
. - $boltServerState
-
Bolt server state, for example,
READY
. - $boltMsgLenLimit
-
Bolt message length limit, for example,
1000
. - $cause
-
Freeform description of what caused the error.
- $cfgSetting
-
Configuration setting key, for example,
server.https.enabled
. - $clause
-
A Cypher clause, for example,
USE
,MATCH
. - $clause
-
A list of Cypher clauses, for example,
USE, MATCH
. - $cmd
-
A Cypher command, for example,
DROP DATABASE
,PROFILE
,SHOW PROCEDURES
. - $component
-
A component of something, for example, hours/minutes within a time, a subset input within the whole input,
TOPOLOGY
clause within the wholeCREATE/ALTER DB … SET TOPOLOGY
, etc. - $constr
-
Constraint name, for example,
book_isbn
. - $constrDescrOrName
-
Constraint description,
(:Label {property0, property1, property2, property1, property3})
. - $context
-
Freeform description of a context, where something is invalid or unsupported,
OPTIONS
,URL
,username
, etc. - $coordinates
-
Coordinate value, for example,
[3.15, 4.012, 5.905]
. - $count
-
Number of something, for example,
3
. - $countAllocs
-
Desired number of servers to use.
- $countSeeders
-
Number of seeding servers.
- $crs
-
Coordinate reference system, for example,
WGS84
. - $db
-
Database name, for example,
myDb
. - $dbList
-
A list of database names.
- $dim
-
Number representing index or point dimenionality.
- $edition
-
Neo4j edition, for example, Community or Enterprise.
- $endpointType
-
One of
start
orend
of a relationship. - $entityId
-
ID of a node or a relationship.
- $entityType
-
A node or a relationship.
- $expr
-
Cypher expression, for example,
1 + n.prop
. - $exprType
-
Freeform expression type, for example,
EXISTS
,COUNT
,COLLECT
. - $feat
-
Freeform feature description.
- $field
-
Input field, for example, of a procedure, function, or deserialization.
- $fun
-
Function name, for example,
collect()
. - $funClass
-
User-defined function implementation class name, for example,
MyFunctionClass
. - $funType
-
Function type, e.g. non-deterministic or aggregate.
- $graph
-
The name of a graph, for example,
myGraph
. - $graphTypeDependence
-
Graph type dependencency for constraint, one of
UNDESIGNATED
,INDEPENDENT
, orDEPENDENT
. - $hint
-
Freeform description of a hint, for example,
USING INDEX n:N(prop)
. - $hintList
-
A list of free form descriptions of hints like
USING INDEX n:N(prop)
. - $idx
-
Index name,
my_index
. - $idxDescr
-
Index description, for example,
INDEX :Person(name)
. - $idxDescrOrName
-
Index descriptor or name.
- $idxOrConstr
-
Index or constraint name, for example,
my_index
orbook_isbn
. - $idxOrConstrPat
-
Index or constraint pattern, for example,
CREATE CONSTRAINT bar IF NOT EXISTS FOR (n:L) REQUIRE (n.p1) IS NODE KEY
. - $idxType
-
Index type, for example, text, vector, etc.
- $input
-
Piece of user input.
- $inputList
-
A list of user inputs.
- $item
-
Freeform description of an item.
- $keyword
-
Cypher keyword, for example,
MERGE
. - $label
-
Label name, for example,
Person
. - $labelExpr
-
Label expression, for example,
(n:Movie|Person)
. - $labelList
-
A list of label names, for example,
Person, Actor
. - $lower
-
The lowest accepted number of a range.
- $mapKey
-
Map key.
- $mapKeyList
-
A list of map keys, for example,
first and second
in the map{first: 1, second: 2}
. - $matchMode
-
GPM match mode, for example,
REPEATABLE ELEMENTS
. - $msg
-
Freeform message.
- $msgTitle
-
Freeform message title.
- $namespaceList
-
A list of namespaces of procedures, for example,
apoc.math.
. - $operation
-
A mathematical operation, for example,
/ by zero
,>
. - $option
-
Option name
- $optionList
-
A list of option names.
- $param
-
Parameter name, for example,
$pattern
. - $paramList
-
A list of parameters, for example
$pattern, $prop
. - $pat
-
Pattern, for example,
(:Person)
. - $port
-
Port name, for example,
6362
. - $portList
-
A list of port names, for example,
6362, 6000, 7000
. - $pos
-
A position, for example, in a sequence, for example,
2
- $pred
-
A predicate, for example,
x = 3
. - $predList
-
A list of predicates, for example,
'x = 3', 'y > 4'
. - $preparserInput
-
Piece of preparser input.
- $proc
-
Procedure name, for example,
db.labels()
. - $procClass
-
User-defined procedure implementation class name, for example,
MyProcedureClass
. - $procExeMode
-
Procedure execution mode, one of
READ
,WRITE
,SCHEMA
, andDBMS
. - $procField
-
User-defined procedure implementation class argument name, for example,
myArgument
. - $procFieldType
-
User-defined procedure implementation class argument type, one of
input
oroutput
. - $procFun
-
Procedure or function name or ID, for example,
db.labels()
orcollect()
. - $procMethod
-
User-defined procedure implementation class method name, for example,
myProcedureMethod
- $procParam
-
User-defined procedure implementation parameter name.
- $procParamFmt
-
Freeform user-defined procedure implementation parameter format, for example,
com.example.*
. - $propKey
-
Property key name, for example,
name
. - $propKeyList
-
A list of property key names, for example,
name, age, hometown
. - $query
-
A statement that retrieves or writes information to a database, for example,
MATCH (n) WHERE n.prop
. - $reasonList
-
A list of reasons of the failure.
- $relType
-
Relationship type name, for example,
KNOWS
. - $replacement
-
A free-form text, a replacement of a deprecated feature, a Cypher command, etc.
- $role
-
RBAC role name, for example,
admin
,public
,receptionist
. - $routingPolicy
-
Routing policy name.
- $runtime
-
Cypher runtime name. One of
slotted
,pipelined
, andparallel
. - $schemaDescr
-
Schema descriptor, for example,
(:Label1 {prop1})
. - $schemaDescrType
-
Freeform type of schema descriptor, for example,
label property existence constraint
. - $selector
-
GPM path selector, for example,
ALL PATHS
,SHORTEST 2
, etc. - $selectorType
-
Selector type.
- $server
-
Server name or ID, for example,
25a7efc7-d063-44b8-bdee-f23357f89f01
. - $serverList
-
A list of server names or IDs, for example,
'server-1', 'server-2'
. - $serverType
-
Server type,
PRIMARY
(primaryConstrained),SECONDARY
(secondaryConstrained), orNONE
. - $serverAddress
-
Server address, for example,
localhost:20025
. - $sig
-
Procedure or function signature, for example,
date(input = DEFAULT_TEMPORAL_ARGUMENT :: ANY) :: DATE
- $syntax
-
Cypher syntax or keyword.
- $temporal
-
Temporal value, for example,
2025-02-18
. - $timeAmount
-
Integral amount of time unit (a number).
- $timeUnit
-
Common time unit name, for example,
seconds
,minutes
,hours
. - $token
-
Token name, for example,
MyLabel
,MyRelationshipType
,myPropertyKey
. - $tokenId
-
Token ID.
- $tokenType
-
One of a label, a relationship type, or a property key.
- $transactionId
-
The transaction ID of a running query.
- $typeDescription
-
Freeform description of a type e.g. 'a list'.
- $upper
-
The highest accepted number of a range.
- $url
-
A URL, for example, https://example.com.
- $user
-
A user name, for example,
neo4j
. - $value
-
Some value.
- $valueList
-
A list of values.
- $valueType
-
Cypher value type, for example,
STRING
,BOOLEAN
,INTEGER
,LIST<STRING>
, etc. - $valueTypeList
-
A list of Cypher value types.
- $variable
-
Variable name, for example,
n
. - $variableList
-
A list of variable names, for example,
a, b, c
.