diff --git a/schema.gql b/schema.gql index 086bc1e..f32863d 100644 --- a/schema.gql +++ b/schema.gql @@ -105,24 +105,6 @@ type Skill { name: String! } -type NotificationData { - id: ID! - title: String! - description: String! - imageUrl: String - notifierId: ID - updatedAt: DateTime! - createdAt: DateTime! -} - -type Notification { - id: ID! - notificationDataId: ID! - userId: ID! - read: Boolean! - data: NotificationData! -} - type Testimony { id: ID! mentorId: String! @@ -151,10 +133,7 @@ type Query { skill(id: Int!): Skill! findNotifications(userId: String): [Notification!]! findOneNotification(id: String!): Notification - findTestimonies( - learnerId: String - mentorId: String - ): [CreateTestimonyOutput!]! + findTestimonies(learnerId: String, mentorId: String): [CreateTestimonyOutput!]! findOneTestimony(id: String!): [CreateTestimonyOutput!]! } @@ -196,9 +175,7 @@ type Mutation { resetUserPassword(userInput: ResetPasswordInput!): Boolean! sendResetPassword(email: String!): Boolean! createAvailability(createAvailabilityInput: CreateAvailabilityInput!): User! - updateAvailability( - updateAvailabilityInput: UpdateAvailabilityInput! - ): Availability! + updateAvailability(updateAvailabilityInput: UpdateAvailabilityInput!): Availability! removeAvailability(id: Int!): Availability! createEvent(createEventInput: CreateEventInput!): Event! updateEvent(updateEventInput: UpdateEventInput!): Event! @@ -206,12 +183,8 @@ type Mutation { createSkill(createSkillInput: CreateSkillInput!): Skill! updateSkill(updateSkillInput: UpdateSkillInput!): Skill! removeSkill(id: Int!): Skill! - createNotification( - createNotificationInput: CreateNotificationInput! - ): NotificationData! - updateNotification( - updateNotificationInput: UpdateNotificationInput! - ): NotificationData! + createNotification(createNotificationInput: CreateNotificationInput!): NotificationData! + updateNotification(updateNotificationInput: UpdateNotificationInput!): NotificationData! markRead(id: String!): Notification! removeNotification(id: ID!): Boolean! createTestimony(createTestimonyInput: CreateTestimonyInput!): Testimony! @@ -225,7 +198,7 @@ input CreateUserInput { email: String! password: String! photoUrl: String - experience: String! + experience: String skills: [String!]! birthDate: DateTime zipCode: String! @@ -283,9 +256,7 @@ input SignInUserInput { rememberMe: Boolean } -""" -The `Upload` scalar type represents a file upload. -""" +"""The `Upload` scalar type represents a file upload.""" scalar Upload input ResetPasswordInput { @@ -333,16 +304,12 @@ input UpdateEventInput { } input CreateSkillInput { - """ - Example field (placeholder) - """ + """Example field (placeholder)""" exampleField: Int! } input UpdateSkillInput { - """ - Example field (placeholder) - """ + """Example field (placeholder)""" exampleField: Int id: Int! } @@ -375,4 +342,4 @@ input UpdateTestimonyInput { learnerId: String text: String id: String! -} +} \ No newline at end of file diff --git a/src/modules/user/dto/create-user.input.ts b/src/modules/user/dto/create-user.input.ts index b8187cf..d468f1d 100644 --- a/src/modules/user/dto/create-user.input.ts +++ b/src/modules/user/dto/create-user.input.ts @@ -49,7 +49,7 @@ export class CreateUserInput { @IsUrl() photoUrl?: string; - @Field() + @Field({ nullable: true }) @IsOptional() @IsString() @Length(3, 5)