Skip to content

Commit

Permalink
PR(ACP-DOCS): Add Permissioned Schema Examples
Browse files Browse the repository at this point in the history
Note:

Permissioned Schema just means for a schema to have a
`@policy(id:"123" resource: "xyz")` directive on it.
  • Loading branch information
shahzadlone committed Feb 29, 2024
1 parent d1be190 commit d380f35
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/schema/permissioned/book.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
type Book @policy(id:"7dc51aabc0248cf106265c902bf56faa1989ec41a6bbd36b6e438cfade7aee4a", resource:"book") {
name: String
rating: Float
}

7 changes: 7 additions & 0 deletions examples/schema/permissioned/users.graphql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
type Users @policy(
id: "24ab8cba6d6f0bcfe4d2712c7d95c09dd1b8076ea5a8896476413fd6c891c18c",
resource: "users"
) {
name: String
age: Int
}

0 comments on commit d380f35

Please sign in to comment.