Add controls crud

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2025-06-05 15:25:37 -07:00
parent c1c19ba9f2
commit 4b34157ba3
37 changed files with 2988 additions and 715 deletions

View File

@@ -169,6 +169,10 @@ enum ControlOrderField
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.ControlOrderFieldCreatedAt"
)
SECTION_TITLE
@goEnum(
value: "github.com/getprobo/probo/pkg/coredata.ControlOrderFieldSectionTitle"
)
}
enum MeasureOrderField
@@ -683,7 +687,7 @@ type Framework implements Node {
type Control implements Node {
id: ID!
referenceId: String!
sectionTitle: String!
name: String!
description: String!
@@ -1087,6 +1091,11 @@ type Mutation {
importFramework(input: ImportFrameworkInput!): ImportFrameworkPayload!
deleteFramework(input: DeleteFrameworkInput!): DeleteFrameworkPayload!
# Control mutations
createControl(input: CreateControlInput!): CreateControlPayload!
updateControl(input: UpdateControlInput!): UpdateControlPayload!
deleteControl(input: DeleteControlInput!): DeleteControlPayload!
# Measure mutations
createMeasure(input: CreateMeasureInput!): CreateMeasurePayload!
updateMeasure(input: UpdateMeasureInput!): UpdateMeasurePayload!
@@ -1502,6 +1511,24 @@ input RemoveUserInput {
userId: ID!
}
input CreateControlInput {
frameworkId: ID!
sectionTitle: String!
name: String!
description: String!
}
input UpdateControlInput {
id: ID!
sectionTitle: String
name: String
description: String
}
input DeleteControlInput {
controlId: ID!
}
# Payload Types
type CreateOrganizationPayload {
organizationEdge: OrganizationEdge!
@@ -1515,6 +1542,18 @@ type DeleteOrganizationPayload {
deletedOrganizationId: ID!
}
type CreateControlPayload {
controlEdge: ControlEdge!
}
type UpdateControlPayload {
control: Control!
}
type DeleteControlPayload {
deletedControlId: ID!
}
type CreateVendorPayload {
vendorEdge: VendorEdge!
}