From 7ffba32bb9d7d677dde10e28d13ad8898cb28a7a Mon Sep 17 00:00:00 2001 From: Daniel Cousens Date: Tue, 8 Aug 2023 12:50:26 +1000 Subject: [PATCH] remove redundant fields from custom-id example --- examples/custom-id/schema.graphql | 28 ---------------------------- examples/custom-id/schema.prisma | 2 -- examples/custom-id/schema.ts | 12 +----------- 3 files changed, 1 insertion(+), 41 deletions(-) diff --git a/examples/custom-id/schema.graphql b/examples/custom-id/schema.graphql index a940950d300..44b58196fda 100644 --- a/examples/custom-id/schema.graphql +++ b/examples/custom-id/schema.graphql @@ -4,18 +4,10 @@ type Task { id: ID! label: String - priority: TaskPriorityType - isComplete: Boolean assignedTo: Person finishBy: DateTime } -enum TaskPriorityType { - low - medium - high -} - scalar DateTime @specifiedBy(url: "https://datatracker.ietf.org/doc/html/rfc3339#section-5.6") input TaskWhereUniqueInput { @@ -28,8 +20,6 @@ input TaskWhereInput { NOT: [TaskWhereInput!] id: IDFilter label: StringFilter - priority: TaskPriorityTypeNullableFilter - isComplete: BooleanFilter assignedTo: PersonWhereInput finishBy: DateTimeNullableFilter } @@ -73,18 +63,6 @@ input NestedStringFilter { not: NestedStringFilter } -input TaskPriorityTypeNullableFilter { - equals: TaskPriorityType - in: [TaskPriorityType!] - notIn: [TaskPriorityType!] - not: TaskPriorityTypeNullableFilter -} - -input BooleanFilter { - equals: Boolean - not: BooleanFilter -} - input DateTimeNullableFilter { equals: DateTime in: [DateTime!] @@ -99,8 +77,6 @@ input DateTimeNullableFilter { input TaskOrderByInput { id: OrderDirection label: OrderDirection - priority: OrderDirection - isComplete: OrderDirection finishBy: OrderDirection } @@ -111,8 +87,6 @@ enum OrderDirection { input TaskUpdateInput { label: String - priority: TaskPriorityType - isComplete: Boolean assignedTo: PersonRelateToOneForUpdateInput finishBy: DateTime } @@ -130,8 +104,6 @@ input TaskUpdateArgs { input TaskCreateInput { label: String - priority: TaskPriorityType - isComplete: Boolean assignedTo: PersonRelateToOneForCreateInput finishBy: DateTime } diff --git a/examples/custom-id/schema.prisma b/examples/custom-id/schema.prisma index 026b37c3ca7..5ea27feecfb 100644 --- a/examples/custom-id/schema.prisma +++ b/examples/custom-id/schema.prisma @@ -15,8 +15,6 @@ generator client { model Task { id Int @id @default(autoincrement()) label String @default("") - priority String? - isComplete Boolean @default(false) assignedTo Person? @relation("Task_assignedTo", fields: [assignedToId], references: [id]) assignedToId String? @map("assignedTo") finishBy DateTime? diff --git a/examples/custom-id/schema.ts b/examples/custom-id/schema.ts index dc500f9b091..8375bd91334 100644 --- a/examples/custom-id/schema.ts +++ b/examples/custom-id/schema.ts @@ -1,7 +1,6 @@ import { list } from '@keystone-6/core'; import { allowAll } from '@keystone-6/core/access'; -import { checkbox, relationship, text, timestamp } from '@keystone-6/core/fields'; -import { select } from '@keystone-6/core/fields'; +import { relationship, text, timestamp } from '@keystone-6/core/fields'; import { createId } from '@paralleldrive/cuid2'; import type { Lists } from '.keystone/types'; @@ -17,15 +16,6 @@ export const lists: Lists = { }, fields: { label: text({ validation: { isRequired: true } }), - priority: select({ - type: 'enum', - options: [ - { label: 'Low', value: 'low' }, - { label: 'Medium', value: 'medium' }, - { label: 'High', value: 'high' }, - ], - }), - isComplete: checkbox(), assignedTo: relationship({ ref: 'Person.tasks', many: false }), finishBy: timestamp(), },