Skip to content

Commit

Permalink
Set fields to nullable
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-sellner committed Mar 19, 2024
1 parent c5df73f commit 911381b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
12 changes: 6 additions & 6 deletions backend/graphql/types/userType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,34 +21,34 @@ const userType = gql`
firstName: String!
lastName: String!
email: String!
startDate: Date!
startDate: Date
birthday: Date
role: Role!
locationType: LocationType
headshot: String!
headshot: String
}
input CreateUserDTO {
firstName: String!
lastName: String!
email: String!
startDate: Date!
startDate: Date
birthday: Date
role: Role!
locationType: LocationType
headshot: String!
headshot: String
password: String!
}
input UpdateUserDTO {
firstName: String!
lastName: String!
email: String!
startDate: Date!
startDate: Date
birthday: Date
role: Role!
locationType: LocationType
headshot: String!
headshot: String
}
extend type Query {
Expand Down
4 changes: 0 additions & 4 deletions backend/models/user.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,16 @@ const UserSchema: Schema = new Schema({
},
startDate: {
type: Date,
required: true,
},
birthday: {
type: Date,
required: true,
},
locationType: {
type: String,
required: true,
enum: ["Remote", "Hybrid", "InPerson"],
},
headshot: {
type: String,
required: true,
},
});

Expand Down

0 comments on commit 911381b

Please sign in to comment.