-
Notifications
You must be signed in to change notification settings - Fork 0
graphql schema
Represents a color in hex code format.
Represents a timestamp with timezone.
STRING
INT
FLOAT
BOOLEAN
COLOR
TIMESTAMP
EVENT_TYPE
TOPIC
Represents a user in the system.
-
fn: String!
- First name. -
sn: String!
- Surname. -
mail: String!
- Email. -
confirmed: Boolean!
- Whether the user is confirmed. -
eventsRegistered: [Event!]
- Events the user is registered to. -
eventsAvailable: [Event!]
- Events available to the user. -
eventsAssigned: [Event!]
- Events assigned to the user.
Represents a label used for events.
-
name: String!
- Name of the label. -
color: HexColorCode
- Color of the label.
Represents a pairing of tutors and rooms for an event.
-
tutors: [User!]
- Tutors assigned to the event in the room. -
room: Room
- Room where the event is held. -
registrations: Int
- Number of registrations for the event in the room.
Represents an event.
-
ID: Int!
- ID of the event. -
tutorsAssigned: [EventTutorRoomPair!]
- Tutors assigned to the event. -
tutorsAvailable: [User!]
- Tutors available for the event. -
roomsAvailable: [Room!]
- Rooms available for the event. -
umbrella: Event
- The umbrella event this event is under. -
needsTutors: Boolean!
- Whether the event needs tutors. -
title: String!
- Title of the event. -
description: String
- Description of the event. -
topic: Label!
- Topic of the event. -
type: Label!
- Type of the event. -
from: timestamptz!
- Start time of the event. -
to: timestamptz!
- End time of the event.
Represents a room in a building.
-
name: String
- Name of the room. -
number: String!
- Room number. -
capacity: Int
- Capacity of the room. -
floor: Int
- Floor where the room is located. -
building: Building!
- The building where the room is located.
Represents a building.
-
ID: Int!
- ID of the building. -
name: String!
- Name of the building. -
street: String!
- Street where the building is located. -
number: String!
- Number on the street. -
city: String!
- City where the building is located. -
zip: Int!
- ZIP code. -
osm: String!
- OpenStreetMap link. -
rooms: [Room!]
- Rooms in the building.
Represents a system setting.
-
key: String!
- Key of the setting. -
value: String!
- Value of the setting. -
type: ScalarType!
- Type of the setting.
Fetches a list of events. Arguments:
-
id: [Int!]
(optional) - List of event IDs to filter events. -
umbrellaID: [Int!]
(optional) - Filter events by umbrella ID. -
label: [String!]
(optional) - List of labels to filter events. -
needsTutors: Boolean
(optional) - Filter events whether it needs tutors. -
onlyFuture: Boolean
(optional) - Filter to only future events. -
userMail: [String!]
(optional) - Filter events by user email.
query {
events(id: [1], label: ["Math"], needsTutors: true) {
ID
title
description
topic {
name
color
}
tutorsAssigned {
tutors {
fn
sn
}
room {
number
name
capacity
}
registrations
}
needsTutors
tutorsAvailable {
fn
sn
}
roomsAvailable {
name
number
}
from
to
}
}
Fetches a list of umbrella events. Arguments:
-
id: [Int!]
(optional) - List of umbrella event IDs. -
onlyFuture: Boolean
(optional) - Filter to only future umbrella events.
Fetches a list of buildings. Arguments:
-
id: [Int!]
(optional) - List of building IDs to filter buildings.
Fetches a list of rooms. Arguments:
-
number: [String!]
(optional) - List of room numbers to filter rooms. -
buildingID: Int!
- Building ID to filter rooms.
Fetches a list of labels. Arguments:
-
name: [String!]
(optional) - List of label names to filter labels. -
kind: [LabelKind!]
(optional) - List of label kinds to filter labels.
Fetches a list of system settings. Arguments:
-
key: [String!]
(optional) - List of setting keys to filter. -
type: [ScalarType!]
(optional) - List of setting types to filter.
Fetches a list of users. Arguments:
-
mail: [String!]
(optional) - List of user emails to filter.
Note:
-
add
andupdate
mutations return the object they have worked on -
delete
mutation returns the number of objects affected. When deleting references between objects,delete
returns the outgoing object.
Adds a new user. Arguments:
-
user: NewUser!
- Details of the new user.
Updates the information of a user. Arguments:
-
user: NewUser!
- Details of the user.
Deletes a user. Arguments:
-
mail: [String!]!
- E-Mail adresses of the user(s) to delete.
Combines the creation of a user and setting initial availabilitys. Arguments:
-
tutor: NewUser!
- Details of the new user. -
availability: UserToEventAvailability
- Pair of tutor mail and event ids.
mutation {
addTutor(
tutor: {fn: "Jane", sn: "Doe", mail: "jane.doe@example.de"}
availability: {userMail: "jane.doe@example.de", eventID: [2, 3]}
) {
fn
confirmed
eventsAvailable {
ID
title
}
}
}
Adds a new event. Arguments:
-
event: NewEvent!
- Details of the new event.
Updates an event's details. Arguments:
-
id: Int!
- ID of the event. -
event: NewEvent!
- Updated details of the event.
Deletes a list of events. Note: deleting an umbrella event will delete all events assigned to it Arguments:
-
id: [Int!]!
- IDs of the event
Adds a new building. Arguments:
-
building: NewBuilding!
- Details of the new building.
Updates a building's details. Arguments:
-
id: Int!
- ID of the building. -
building: NewBuilding!
- Updated details of the building.
Deletes a list of buildings. Note: This also deletes all rooms in the buildings Arguments:
-
id: [Int!]!
- IDs of buildings
Adds a new room. Arguments:
-
room: NewRoom!
- Details of the new room.
Updates a room's details. Arguments:
-
room: NewRoom!
- Details of the updated room.
Deletes a room in a building. Arguments:
-
number: [String!]!
- List of room numbers -
buildingID: Int!
- ID of building
Adds a new label. Arguments:
-
label: NewLabel!
- Details of the new label.
Updates a label's details. Arguments:
-
label: NewLabel!
- Details of the updated new label.
Deletes a list of labels. Arguments:
-
name: [String!]!
- Names of labels
Assigns a user to an event as tutor. Arguments:
-
assignment: EventToUserAssignment!
- Event, User, Room pair
mutation {
addEventAssignmentForTutor(
assignment: {eventID: 1, userMail: "john.doe@example.de", roomNumber: "101", buildingID: 1}
) {
title
roomsAvailable {
number
}
}
}
Unassigns a user from an event as tutor. Arguments:
-
assignment: EventToUserAssignment!
- Event, User, Room pair
Marks user as available for an event as tutor. Arguments:
-
availability: NewUserToEventAvailability!
- User, Event pair
Unmarks user as available for an event as tutor. Arguments:
-
availability: NewUserToEventAvailability!
- User, Event pair
Marks room as available for an event Arguments:
-
availability: RoomToEventAvailability!
- Room, Event pair
Unmarks room as available for an event Arguments:
-
availability: RoomToEventAvailability!
- Room, Event pair
Registers a user to an event. Arguments:
-
registration: UserToEventRegistration!
- User, Event, Room pair
Unregisters a user from an event. Arguments:
-
registration: UserToEventRegistration!
- User, Event, Room pair