From b967e0ffe7bfdf56667dde58e9612a2e3a2e8f39 Mon Sep 17 00:00:00 2001 From: Shahzad Lone Date: Wed, 28 Feb 2024 20:35:39 -0500 Subject: [PATCH] PR(ACP-DOCS): Add Permissioned Schema Examples Note: Permissioned Schema just means for a schema to have a `@policy(id:"123" resource: "xyz")` directive on it. --- examples/schema/permissioned/book.graphql | 5 +++++ examples/schema/permissioned/users.graphql | 7 +++++++ 2 files changed, 12 insertions(+) create mode 100644 examples/schema/permissioned/book.graphql create mode 100644 examples/schema/permissioned/users.graphql diff --git a/examples/schema/permissioned/book.graphql b/examples/schema/permissioned/book.graphql new file mode 100644 index 0000000000..fc558621e7 --- /dev/null +++ b/examples/schema/permissioned/book.graphql @@ -0,0 +1,5 @@ +type Book @policy(id:"7dc51aabc0248cf106265c902bf56faa1989ec41a6bbd36b6e438cfade7aee4a", resource:"book") { + name: String + rating: Float +} + diff --git a/examples/schema/permissioned/users.graphql b/examples/schema/permissioned/users.graphql new file mode 100644 index 0000000000..ce38d278ac --- /dev/null +++ b/examples/schema/permissioned/users.graphql @@ -0,0 +1,7 @@ +type Users @policy( + id: "24ab8cba6d6f0bcfe4d2712c7d95c09dd1b8076ea5a8896476413fd6c891c18c", + resource: "users" +) { + name: String + age: Int +}