> ## Documentation Index
> Fetch the complete documentation index at: https://helix-claude-document-return-objects-rxi6v.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Default Values

> Setting default schema.

Sometimes, you may want to set default values for item fields

```helixql theme={null}
N::NodeType {
  field1: String DEFAULT "default",
  field2: U32 DEFAULT 0,
  created_at: Date DEFAULT NOW
}
```

Helix will use the default value if a value is not provided when inserting the item.

### Default value types

| 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 |

***

#### Example

In the example below, the `age` field has not been provided when inserting the item so the default value of `0` will be used.

```helixql theme={null}
QUERY createUser(name: String) =>
    user <- AddN<User>({name}) 
    RETURN user
```
