Skip to content

Instantly share code, notes, and snippets.

@dabit3
Created March 9, 2020 14:47
Show Gist options
  • Save dabit3/6d5045af034a6f3a96c51880d1bbfab9 to your computer and use it in GitHub Desktop.
Save dabit3/6d5045af034a6f3a96c51880d1bbfab9 to your computer and use it in GitHub Desktop.
Fine grained access control
type Post @model
@auth(rules: [
# Owner can create, update, delete
{ allow: owner },
# Authorize group-based access control
{ allow: groups, groups: ["Admin"] }
]) {
id: ID!
title: String!
content: String
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment