Schema validation
Surrealize provides you with a agnostic schema validation system. So you can use your favorite schema validation library.
Out of the box support
Currently we support the following schema validation libraries without any adapters:
| Library | Status | Website |
|---|---|---|
zod | ✅ | https://zod.dev |
// TODO: add more libraries
✅ = fully supported
⚠️ = partially supported
🚫 = not supported
Add support for other libraries
If you want to add support for other libraries, you can create an adapter for it which converts the library schema to a Surrealize schema function.
Adapters
If you want to add support for other libraries, you need an adapter which converts the library schema to a Surrealize schema function.
Adapters can also provide additional features like a RecordId schema or a Table schema.
List of known adapters
| Adapter | Bridge | Custom schemas |
|---|---|---|
@surrealize/adapter-zod | ✅ |