Schema

schema {
query: Query
mutation: Mutations
}
type AbsoluteDateCondition implements Condition {
id: UUID!
fulfilled: Boolean!
comparison: DateConditionComparisonEnum!
date: DateTime!
}
type AddUsersToGroup {
addedIds: [UUID]
addedRefs: [String]
alreadyAddedIds: [UUID]
alreadyAddedRefs: [String]
failedIds: [UUID]
failedRefs: [String]
}
type AddUsersToTraining {
addedIds: [UUID]
addedRefs: [String]
alreadyAddedIds: [UUID]
alreadyAddedRefs: [String]
failedIds: [UUID]
failedRefs: [String]
}
interface Condition {
id: UUID!
fulfilled: Boolean!
}
type CreateGroup {
group: Group
}
input CreateGroupInput {
name: String!
enableChat: Boolean = false
ref: String
}
type CreateTraining {
training: Training
}
input CreateTrainingInput {
title: String!
isActive: Boolean
subtitle: String
introduction: String
startDate: Date
endDate: Date
showParticipants: Boolean
showSharedFiles: Boolean
enableChat: Boolean
ref: String
}
type CreateUser {
user: User
}
input CreateUserInput {
isActive: Boolean
email: String!
name: String!
roles: [Role!]
ref: String
extraFields: JSONString
}
scalar Date
enum DateConditionComparisonEnum {
START
END
}
scalar DateTime
type Group {
id: UUID!
name: String!
users: [User!]!
enableChat: Boolean!
ref: String
}
scalar JSONString
enum Language {
EN
NL
}
type Mutations {
createUser(sendInvite: Boolean = true, user: CreateUserInput!): CreateUser
updateUser(ref: String, id: UUID, user: UpdateUserInput!): UpdateUser
updateOrCreateUser(email: String, ref: String, user: UpdateOrCreateUserInput!): UpdateOrCreateUser
createGroup(group: CreateGroupInput!): CreateGroup
updateGroup(ref: String, group: UpdateGroupInput!, id: UUID): UpdateGroup
addUsersToGroup(groupRef: String, groupId: UUID, userRefs: [String!], userIds: [UUID!]): AddUsersToGroup
removeUsersFromGroup(groupRef: String, groupId: UUID, userRefs: [String!], userIds: [UUID!]): RemoveUsersFromGroup
createTraining(training: CreateTrainingInput!): CreateTraining
updateTraining(ref: String, training: UpdateTrainingInput!, id: UUID): UpdateTraining
addUsersToTraining(role: TrainingRole = participant, sendInvites: Boolean = true, trainingRef: String, trainingId: UUID, userRefs: [String!], userIds: [UUID!]): AddUsersToTraining
removeUsersFromTraining(role: TrainingRole = participant, trainingRef: String, trainingId: UUID, userRefs: [String!], userIds: [UUID!]): RemoveUsersFromTraining
}
type Query {
group(id: UUID, ref: String): Group
groups: [Group]
user(id: UUID, ref: String): User
users(active: Boolean): [User]
training(id: UUID, ref: String): Training
trainings(active: Boolean, archived: Boolean = false, query: String, extraFields: JSONString): [Training!]
}
type RelativeDateCondition implements Condition {
id: UUID!
fulfilled: Boolean!
comparison: DateConditionComparisonEnum!
offset: TimeDelta!
}
type RemoveUsersFromGroup {
removedIds: [UUID]
removedRefs: [String]
alreadyRemovedIds: [UUID]
alreadyRemovedRefs: [String]
failedIds: [UUID]
failedRefs: [String]
}
type RemoveUsersFromTraining {
removedIds: [UUID]
removedRefs: [String]
alreadyRemovedIds: [UUID]
alreadyRemovedRefs: [String]
failedIds: [UUID]
failedRefs: [String]
}
enum Role {
MANAGER
PLANNER
AUTHOR
}
type TimeDelta {
days: Int!
seconds: Int!
microseconds: Int!
}
type Training {
id: UUID!
isActive: Boolean!
title: String!
subtitle: String!
introduction: String!
image: File
startDate: Date @deprecated(reason: "Replaced by the AbsoluteDateCondition")
endDate: Date @deprecated(reason: "Replaced by the AbsoluteDateCondition")
users: [User!]!
groups: [Group!]!
showParticipants: Boolean!
showSharedFiles: Boolean!
enableChat: Boolean!
ref: String
rolesForCurrentUser: [TrainingRole!]
allConditionsFulfilled: Boolean!
conditions: [Condition!]!
nextEvent: DateTime
progress: Float
}
enum TrainingRole {
PARTICIPANT
TRAINER
MENTOR
}
scalar UUID
type UpdateArticle {
article: Article
}
type UpdateCollection {
collection: Collection
}
type UpdateGroup {
group: Group
}
input UpdateGroupInput {
name: String
enableChat: Boolean
ref: String
}
type UpdateOrCreateUser {
user: User
created: Boolean
}
input UpdateOrCreateUserInput {
isActive: Boolean
email: String
name: String
roles: [Role!]
ref: String
extraFields: JSONString
}
type UpdateTraining {
training: Training
}
input UpdateTrainingInput {
title: String
isActive: Boolean
subtitle: String
introduction: String
startDate: Date
endDate: Date
showParticipants: Boolean
showSharedFiles: Boolean
enableChat: Boolean
ref: String
}
type UpdateUser {
user: User
}
input UpdateUserInput {
isActive: Boolean
email: String
name: String
roles: [Role!]
ref: String
extraFields: JSONString
}
type User {
id: UUID!
isActive: Boolean!
email: String!
name: String!
ref: String
roles: [Role]
profileImage: String!
language: Language!
extraFields: JSONString!
}
type UsersAndGroupsCondition implements Condition {
id: UUID!
fulfilled: Boolean!
openRegistration: Boolean!
users: [User!]
groups: [Group!]
}