Add control state transitions graphql resolver

Signed-off-by: gearnode <bryan@frimin.fr>
This commit is contained in:
gearnode
2025-01-27 19:02:10 +01:00
parent 6631543824
commit 9a191d7ee1
9 changed files with 1211 additions and 31 deletions

View File

@@ -14,10 +14,10 @@ interface Node {
}
enum ControlState {
NotStarted
InProgress
NotApplicable
Implemented
NOT_STARTED
IN_PROGRESS
NOT_APPLICABLE
IMPLEMENTED
}
@@ -85,6 +85,13 @@ type Control implements Node {
description: String!
state: ControlState!
stateTransisions(
first: Int
after: CursorKey
last: Int
before: CursorKey
): ControlStateTransitionConnection! @goField(forceResolver: true)
tasks(
first: Int
after: CursorKey
@@ -96,6 +103,25 @@ type Control implements Node {
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!