diff --git a/src/@types/graphql.ts b/src/@types/graphql.ts index e4ef0f9c..7271b4ba 100644 --- a/src/@types/graphql.ts +++ b/src/@types/graphql.ts @@ -210,6 +210,7 @@ export type CreateProjectInput = { export type CreateProjectLabelInput = { color: Scalars['String']['input']; + ml?: InputMaybe; name: Scalars['String']['input']; reviewerEnabled?: InputMaybe; }; @@ -1130,6 +1131,7 @@ export type UpdateProjectInput = { export type UpdateProjectLabelInput = { _id: Scalars['ID']['input']; color: Scalars['String']['input']; + ml?: InputMaybe; name: Scalars['String']['input']; reviewerEnabled?: InputMaybe; }; diff --git a/src/api/db/models/Project.ts b/src/api/db/models/Project.ts index 5b9979cf..5ae58cc3 100644 --- a/src/api/db/models/Project.ts +++ b/src/api/db/models/Project.ts @@ -597,10 +597,7 @@ export class ProjectModel { 'A label with that name already exists, avoid creating labels with duplicate names', ); - project.labels.push({ - name: input.name, - color: input.color, - }); + project.labels.push(input); await project.save(); diff --git a/src/api/type-defs/inputs/CreateProjectLabelInput.ts b/src/api/type-defs/inputs/CreateProjectLabelInput.ts index ef999849..639de173 100644 --- a/src/api/type-defs/inputs/CreateProjectLabelInput.ts +++ b/src/api/type-defs/inputs/CreateProjectLabelInput.ts @@ -3,5 +3,6 @@ export default /* GraphQL */ ` name: String! color: String! reviewerEnabled: Boolean + ml: Boolean } `; diff --git a/src/api/type-defs/inputs/UpdateProjectLabelInput.ts b/src/api/type-defs/inputs/UpdateProjectLabelInput.ts index 0f309e66..d5f934de 100644 --- a/src/api/type-defs/inputs/UpdateProjectLabelInput.ts +++ b/src/api/type-defs/inputs/UpdateProjectLabelInput.ts @@ -4,5 +4,6 @@ export default /* GraphQL */ ` name: String! color: String! reviewerEnabled: Boolean + ml: Boolean } `;