First step of mitigation migration
Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
@@ -155,6 +155,14 @@ type Organization implements Node {
|
||||
orderBy: PolicyOrder
|
||||
): PolicyConnection! @goField(forceResolver: true)
|
||||
|
||||
mitigations(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: MitigationOrder
|
||||
): MitigationConnection! @goField(forceResolver: true)
|
||||
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
@@ -186,7 +194,18 @@ enum FrameworkOrderField
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/coredata.FrameworkOrderField"
|
||||
) {
|
||||
NAME
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.FrameworkOrderFieldCreatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum ControlOrderField
|
||||
@goModel(model: "github.com/getprobo/probo/pkg/coredata.ControlOrderField") {
|
||||
CREATED_AT
|
||||
@goEnum(
|
||||
value: "github.com/getprobo/probo/pkg/coredata.ControlOrderFieldCreatedAt"
|
||||
)
|
||||
}
|
||||
|
||||
enum MitigationOrderField
|
||||
@@ -235,6 +254,14 @@ input FrameworkOrder
|
||||
field: FrameworkOrderField!
|
||||
}
|
||||
|
||||
input ControlOrder
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.ControlOrderBy"
|
||||
) {
|
||||
direction: OrderDirection!
|
||||
field: ControlOrderField!
|
||||
}
|
||||
|
||||
input MitigationOrder
|
||||
@goModel(
|
||||
model: "github.com/getprobo/probo/pkg/server/api/console/v1/types.MitigationOrderBy"
|
||||
@@ -285,7 +312,6 @@ type People implements Node {
|
||||
kind: PeopleKind!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
version: Int!
|
||||
}
|
||||
|
||||
type VendorConnection {
|
||||
@@ -311,7 +337,6 @@ type Vendor implements Node {
|
||||
privacyPolicyUrl: String
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
version: Int!
|
||||
}
|
||||
|
||||
type FrameworkConnection {
|
||||
@@ -326,23 +351,40 @@ type FrameworkEdge {
|
||||
|
||||
type Framework implements Node {
|
||||
id: ID!
|
||||
version: Int!
|
||||
|
||||
name: String!
|
||||
description: String!
|
||||
|
||||
mitigations(
|
||||
controls(
|
||||
first: Int
|
||||
after: CursorKey
|
||||
last: Int
|
||||
before: CursorKey
|
||||
orderBy: MitigationOrder
|
||||
): MitigationConnection! @goField(forceResolver: true)
|
||||
orderBy: ControlOrder
|
||||
): ControlConnection! @goField(forceResolver: true)
|
||||
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
|
||||
type ControlConnection {
|
||||
edges: [ControlEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
}
|
||||
|
||||
type ControlEdge {
|
||||
cursor: CursorKey!
|
||||
node: Control!
|
||||
}
|
||||
|
||||
type Control implements Node {
|
||||
id: ID!
|
||||
referenceId: String!
|
||||
name: String!
|
||||
description: String!
|
||||
createdAt: Datetime!
|
||||
updatedAt: Datetime!
|
||||
}
|
||||
|
||||
type MitigationConnection {
|
||||
edges: [MitigationEdge!]!
|
||||
pageInfo: PageInfo!
|
||||
@@ -355,7 +397,6 @@ type MitigationEdge {
|
||||
|
||||
type Mitigation implements Node {
|
||||
id: ID!
|
||||
version: Int!
|
||||
category: String!
|
||||
name: String!
|
||||
description: String!
|
||||
@@ -386,7 +427,6 @@ type TaskEdge {
|
||||
|
||||
type Task implements Node {
|
||||
id: ID!
|
||||
version: Int!
|
||||
name: String!
|
||||
description: String!
|
||||
state: TaskState!
|
||||
@@ -506,6 +546,7 @@ type Mutation {
|
||||
createFramework(input: CreateFrameworkInput!): CreateFrameworkPayload!
|
||||
updateFramework(input: UpdateFrameworkInput!): UpdateFrameworkPayload!
|
||||
importFramework(input: ImportFrameworkInput!): ImportFrameworkPayload!
|
||||
deleteFramework(input: DeleteFrameworkInput!): DeleteFrameworkPayload!
|
||||
|
||||
createMitigation(input: CreateMitigationInput!): CreateMitigationPayload!
|
||||
updateMitigation(input: UpdateMitigationInput!): UpdateMitigationPayload!
|
||||
@@ -553,7 +594,6 @@ input CreatePeopleInput {
|
||||
|
||||
input UpdatePeopleInput {
|
||||
id: ID!
|
||||
expectedVersion: Int!
|
||||
fullName: String
|
||||
primaryEmailAddress: String
|
||||
additionalEmailAddresses: [String!]
|
||||
@@ -588,7 +628,6 @@ enum RiskTier
|
||||
|
||||
input UpdateVendorInput {
|
||||
id: ID!
|
||||
expectedVersion: Int!
|
||||
name: String
|
||||
description: String
|
||||
serviceStartAt: Datetime
|
||||
@@ -662,6 +701,14 @@ type DeleteTaskPayload {
|
||||
deletedTaskId: ID!
|
||||
}
|
||||
|
||||
input DeleteFrameworkInput {
|
||||
frameworkId: ID!
|
||||
}
|
||||
|
||||
type DeleteFrameworkPayload {
|
||||
deletedFrameworkId: ID!
|
||||
}
|
||||
|
||||
input CreateFrameworkInput {
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
@@ -670,7 +717,6 @@ input CreateFrameworkInput {
|
||||
|
||||
input UpdateFrameworkInput {
|
||||
id: ID!
|
||||
expectedVersion: Int!
|
||||
name: String
|
||||
description: String
|
||||
}
|
||||
@@ -680,7 +726,7 @@ type CreateFrameworkPayload {
|
||||
}
|
||||
|
||||
input CreateMitigationInput {
|
||||
frameworkId: ID!
|
||||
organizationId: ID!
|
||||
name: String!
|
||||
description: String!
|
||||
category: String!
|
||||
@@ -705,7 +751,6 @@ type UpdatePeoplePayload {
|
||||
|
||||
input UpdateMitigationInput {
|
||||
id: ID!
|
||||
expectedVersion: Int!
|
||||
name: String
|
||||
description: String
|
||||
category: String
|
||||
@@ -757,7 +802,6 @@ input CreatePolicyInput {
|
||||
|
||||
input UpdatePolicyInput {
|
||||
id: ID!
|
||||
expectedVersion: Int!
|
||||
name: String
|
||||
content: String
|
||||
status: PolicyStatus
|
||||
@@ -783,7 +827,6 @@ type DeletePolicyPayload {
|
||||
|
||||
type Policy implements Node {
|
||||
id: ID!
|
||||
version: Int!
|
||||
name: String!
|
||||
status: PolicyStatus!
|
||||
content: String!
|
||||
@@ -805,7 +848,6 @@ type PolicyEdge {
|
||||
|
||||
input UpdateTaskInput {
|
||||
taskId: ID!
|
||||
expectedVersion: Int!
|
||||
name: String
|
||||
description: String
|
||||
state: TaskState
|
||||
|
||||
Reference in New Issue
Block a user