From e5c08680ea8ecc001ee9e882b4f187664817899f Mon Sep 17 00:00:00 2001 From: Tim Leslie Date: Thu, 2 Sep 2021 09:48:36 +1000 Subject: [PATCH] Clean up blog schema --- examples/blog/schema.graphql | 6 ------ examples/blog/schema.prisma | 12 ++++-------- examples/blog/schema.ts | 4 ---- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/examples/blog/schema.graphql b/examples/blog/schema.graphql index 0ae5a54fcde..d0edfca215f 100644 --- a/examples/blog/schema.graphql +++ b/examples/blog/schema.graphql @@ -118,8 +118,6 @@ type Author { skip: Int! = 0 ): [Post!] postsCount(where: PostWhereInput! = {}): Int - noUpdate: String - noCreate: String } input AuthorWhereUniqueInput { @@ -141,8 +139,6 @@ input AuthorUpdateInput { name: String email: String posts: PostRelateToManyForUpdateInput - noRead: String - noCreate: String } input PostRelateToManyForUpdateInput { @@ -161,8 +157,6 @@ input AuthorCreateInput { name: String email: String posts: PostRelateToManyForCreateInput - noRead: String - noUpdate: String } input PostRelateToManyForCreateInput { diff --git a/examples/blog/schema.prisma b/examples/blog/schema.prisma index b74c6a0c051..33d6cc1f737 100644 --- a/examples/blog/schema.prisma +++ b/examples/blog/schema.prisma @@ -24,12 +24,8 @@ model Post { } model Author { - id String @id @default(cuid()) - name String? - email String? @unique - posts Post[] @relation("Post_author") - noRead String? - noUpdate String? - noCreate String? - noExist String? + id String @id @default(cuid()) + name String? + email String? @unique + posts Post[] @relation("Post_author") } \ No newline at end of file diff --git a/examples/blog/schema.ts b/examples/blog/schema.ts index 9b5d08609ef..62895796062 100644 --- a/examples/blog/schema.ts +++ b/examples/blog/schema.ts @@ -22,10 +22,6 @@ export const lists = createSchema({ name: text({ isRequired: true }), email: text({ isRequired: true, isIndexed: 'unique' }), posts: relationship({ ref: 'Post.author', many: true }), - noRead: text({ graphql: { omit: ['read'] } }), - noUpdate: text({ graphql: { omit: ['update'] } }), - noCreate: text({ graphql: { omit: ['create'] } }), - noExist: text({ graphql: { omit: true } }), }, }), });