Last active
June 26, 2021 17:17
-
-
Save danahartweg/c215bd7d7c33c8df913d2cd69c5962d1 to your computer and use it in GitHub Desktop.
Fauna ABAC - Core schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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