Files
probo/pkg/api/console/v1/schema.graphql
gearnode 14380aa635 Add evidence state history
Signed-off-by: gearnode <bryan@frimin.fr>
2025-01-30 21:37:48 -08:00

286 lines
4.6 KiB
GraphQL

directive @goField(
forceResolver: Boolean
name: String
omittable: Boolean
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
scalar CursorKey
scalar Void
scalar Datetime
scalar Upload
interface Node {
id: ID!
}
enum ControlState {
NOT_STARTED
IN_PROGRESS
NOT_APPLICABLE
IMPLEMENTED
}
enum TaskState {
TODO
DONE
}
enum EvidenceState {
VALID
INVALID
EXPIRED
}
type PageInfo {
hasNextPage: Boolean!
hasPreviousPage: Boolean!
startCursor: CursorKey
endCursor: CursorKey
}
type Organization implements Node {
id: ID!
name: String!
frameworks(
first: Int
after: CursorKey
last: Int
before: CursorKey
): FrameworkConnection! @goField(forceResolver: true)
vendors(
first: Int
after: CursorKey
last: Int
before: CursorKey
): VendorConnection! @goField(forceResolver: true)
peoples(
first: Int
after: CursorKey
last: Int
before: CursorKey
): PeopleConnection! @goField(forceResolver: true)
createdAt: Datetime!
updatedAt: Datetime!
}
type PeopleConnection {
edges: [PeopleEdge!]!
pageInfo: PageInfo!
}
type PeopleEdge {
cursor: CursorKey!
node: People!
}
type People implements Node {
id: ID!
fullName: String!
primaryEmailAddress: String!
additionalEmailAddresses: [String!]!
createdAt: Datetime!
updatedAt: Datetime!
}
type VendorConnection {
edges: [VendorEdge!]!
pageInfo: PageInfo!
}
type VendorEdge {
cursor: CursorKey!
node: Vendor!
}
type Vendor implements Node {
id: ID!
name: String!
createdAt: Datetime!
updatedAt: Datetime!
}
type FrameworkConnection {
edges: [FrameworkEdge!]!
pageInfo: PageInfo!
}
type FrameworkEdge {
cursor: CursorKey!
node: Framework!
}
type Framework implements Node {
id: ID!
name: String!
description: String!
controls(
first: Int
after: CursorKey
last: Int
before: CursorKey
): 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!
name: String!
description: String!
state: ControlState!
stateTransisions(
first: Int
after: CursorKey
last: Int
before: CursorKey
): ControlStateTransitionConnection! @goField(forceResolver: true)
tasks(
first: Int
after: CursorKey
last: Int
before: CursorKey
): TaskConnection! @goField(forceResolver: true)
createdAt: Datetime!
updatedAt: Datetime!
}
type ControlStateTransitionConnection {
edges: [ControlStateTransitionEdge!]!
pageInfo: PageInfo!
}
type ControlStateTransitionEdge {
cursor: CursorKey!
node: ControlStateTransition!
}
type ControlStateTransition {
id: ID!
fromState: ControlState
toState: ControlState!
reason: String
createdAt: Datetime!
updatedAt: Datetime!
}
type TaskConnection {
edges: [TaskEdge!]!
pageInfo: PageInfo!
}
type TaskEdge {
cursor: CursorKey!
node: Task!
}
type Task implements Node {
id: ID!
name: String!
description: String!
state: TaskState!
stateTransisions(
first: Int
after: CursorKey
last: Int
before: CursorKey
): TaskStateTransitionConnection! @goField(forceResolver: true)
evidences(
first: Int
after: CursorKey
last: Int
before: CursorKey
): EvidenceConnection! @goField(forceResolver: true)
createdAt: Datetime!
updatedAt: Datetime!
}
type TaskStateTransitionConnection {
edges: [TaskStateTransitionEdge!]!
pageInfo: PageInfo!
}
type TaskStateTransitionEdge {
cursor: CursorKey!
node: TaskStateTransition!
}
type TaskStateTransition {
id: ID!
fromState: TaskState
toState: TaskState!
reason: String
createdAt: Datetime!
updatedAt: Datetime!
}
type EvidenceConnection {
edges: [EvidenceEdge!]!
pageInfo: PageInfo!
}
type EvidenceEdge {
cursor: CursorKey!
node: Evidence!
}
type Evidence implements Node {
id: ID!
fileUrl: String!
state: EvidenceState!
stateTransisions(
first: Int
after: CursorKey
last: Int
before: CursorKey
): EvidenceStateTransitionConnection! @goField(forceResolver: true)
createdAt: Datetime!
updatedAt: Datetime!
}
type Query {
node(id: ID!): Node!
}
type EvidenceStateTransitionConnection {
edges: [EvidenceStateTransitionEdge!]!
pageInfo: PageInfo!
}
type EvidenceStateTransitionEdge {
cursor: CursorKey!
node: EvidenceStateTransition!
}
type EvidenceStateTransition {
id: ID!
fromState: EvidenceState
toState: EvidenceState!
reason: String
createdAt: Datetime!
updatedAt: Datetime!
}