Default value types
Example
In the example below, theage field has not been provided when inserting the item so the default value of 0 will be used.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Setting default schema.
N::NodeType {
field1: String DEFAULT "default",
field2: U32 DEFAULT 0,
created_at: Date DEFAULT NOW
}
| Type | Example | Description |
|---|---|---|
| String | DEFAULT "value" | Default string literal |
| Number | DEFAULT 0 | Default numeric value |
| Timestamp | DEFAULT NOW | Automatically set to current timestamp on creation |
age field has not been provided when inserting the item so the default value of 0 will be used.
QUERY createUser(name: String) =>
user <- AddN<User>({name})
RETURN user
Was this page helpful?