331 lines
6.5 KiB
GraphQL
331 lines
6.5 KiB
GraphQL
directive @goField(
|
|
forceResolver: Boolean
|
|
name: String
|
|
omittable: Boolean
|
|
) on INPUT_FIELD_DEFINITION | FIELD_DEFINITION
|
|
|
|
directive @goModel(
|
|
model: String
|
|
models: [String!]
|
|
) on OBJECT | INPUT_OBJECT | SCALAR | ENUM | INTERFACE | UNION
|
|
|
|
directive @goEnum(
|
|
value: String
|
|
) on ENUM_VALUE
|
|
|
|
scalar CursorKey
|
|
scalar Void
|
|
scalar Datetime
|
|
scalar Upload
|
|
|
|
interface Node {
|
|
id: ID!
|
|
}
|
|
|
|
enum ControlState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.ControlState") {
|
|
NOT_STARTED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotStarted")
|
|
IN_PROGRESS @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateInProgress")
|
|
NOT_APPLICABLE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateNotApplicable")
|
|
IMPLEMENTED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.ControlStateImplemented")
|
|
}
|
|
|
|
enum TaskState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.TaskState") {
|
|
TODO @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateTodo")
|
|
DONE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.TaskStateDone")
|
|
}
|
|
|
|
enum EvidenceState @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceState") {
|
|
VALID @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateValid")
|
|
INVALID @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateInvalid")
|
|
EXPIRED @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.EvidenceStateExpired")
|
|
}
|
|
|
|
enum PeopleKind @goModel(model: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKind") {
|
|
EMPLOYEE @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindEmployee")
|
|
CONTRACTOR @goEnum(value: "github.com/getprobo/probo/pkg/probo/coredata.PeopleKindContractor")
|
|
}
|
|
|
|
type PageInfo {
|
|
hasNextPage: Boolean!
|
|
hasPreviousPage: Boolean!
|
|
startCursor: CursorKey
|
|
endCursor: CursorKey
|
|
}
|
|
|
|
type Organization implements Node {
|
|
id: ID!
|
|
name: String!
|
|
logoUrl: 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!]!
|
|
kind: PeopleKind!
|
|
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!
|
|
category: String!
|
|
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!
|
|
mimeType: String!
|
|
size: Int!
|
|
state: EvidenceState!
|
|
|
|
stateTransisions(
|
|
first: Int
|
|
after: CursorKey
|
|
last: Int
|
|
before: CursorKey
|
|
): EvidenceStateTransitionConnection! @goField(forceResolver: true)
|
|
|
|
createdAt: Datetime!
|
|
updatedAt: Datetime!
|
|
}
|
|
|
|
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!
|
|
}
|
|
|
|
type Query {
|
|
node(id: ID!): Node!
|
|
}
|
|
|
|
type Mutation {
|
|
createVendor(input: CreateVendorInput!): Vendor!
|
|
deleteVendor(input: DeleteVendorInput!): Void!
|
|
deletePeople(input: DeletePeopleInput!): Void!
|
|
createPeople(input: CreatePeopleInput!): People!
|
|
}
|
|
|
|
input CreateVendorInput {
|
|
organizationId: ID!
|
|
name: String!
|
|
}
|
|
|
|
input DeleteVendorInput {
|
|
vendorId: ID!
|
|
}
|
|
|
|
input DeletePeopleInput {
|
|
peopleId: ID!
|
|
}
|
|
|
|
input CreatePeopleInput {
|
|
organizationId: ID!
|
|
fullName: String!
|
|
primaryEmailAddress: String!
|
|
kind: PeopleKind!
|
|
} |