Skip to content
Merged
Changes from all commits
Commits
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
14 changes: 12 additions & 2 deletions pages/spicedb/modeling/composable-schemas.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,18 @@ This syntax:

```zed
partial view_partial {
relation user: user
permission view = user
relation viewer: user
permission view = viewer
}

partial edit_partial {
relation editor: user
permission edit = editor
}

definition resource {
...view_partial
...edit_partial
}
```

Expand All @@ -163,6 +169,9 @@ is equivalent to this declaration:
definition resource {
relation user: user
permission view = user

relation editor: user
permission edit = editor
}
```

Expand All @@ -172,6 +181,7 @@ definition resource {
* Circular references between partials are treated as errors.
* You can only reference partial declarations.
Attempting to reference other declaration types (e.g. a definition or a caveat) with a partial reference will result in a error.
* A partial can be referenced any number of times, and a partial or definition can contain any number of partial references.

## An Example Workflow

Expand Down