Skip to content

Instantly share code, notes, and snippets.

@danahartweg
Last active June 26, 2021 17:17
Show Gist options
  • Save danahartweg/c215bd7d7c33c8df913d2cd69c5962d1 to your computer and use it in GitHub Desktop.
Save danahartweg/c215bd7d7c33c8df913d2cd69c5962d1 to your computer and use it in GitHub Desktop.
Fauna ABAC - Core schema
type User {
name: String
email: String!
organizations: [OrganizationMember!] @relation
}
enum OrganizationMemberRole {
OWNER
MEMBER
GUEST
}
type OrganizationMember {
user: User!
organization: Organization!
role: OrganizationMemberRole!
}
type Organization {
name: String!
description: String
items: [Item!] @relation
members: [OrganizationMember!]! @relation
}
type Item {
name: String!
isPublic: Boolean
createdBy: User!
origin: Organization!
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment