-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added delete mutations to readme (#41)
- Loading branch information
1 parent
b1de1e3
commit c8b31c8
Showing
1 changed file
with
109 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -230,6 +230,18 @@ mutation { | |
} | ||
``` | ||
|
||
### `deleteUser` | ||
Deletes a list of users. *Note: Tutors and Students are users.* | ||
#### Arguments: | ||
- `mail: [String!]!` - Email of the users. | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
deleteUser(mail: "[email protected]") | ||
} | ||
``` | ||
|
||
### `addEvent` | ||
Adds a new event. | ||
#### Arguments: | ||
|
@@ -271,6 +283,18 @@ mutation { | |
} | ||
``` | ||
|
||
### `deleteEvent` | ||
Deletes a list of events. | ||
#### Arguments: | ||
- `eventID: [Int!]!` - IDs of the event | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
deleteEvent(eventID: [1, 2]) | ||
} | ||
``` | ||
|
||
### `addBuilding` | ||
Adds a new building. | ||
#### Arguments: | ||
|
@@ -290,6 +314,38 @@ mutation { | |
} | ||
``` | ||
|
||
### ~~`updateBuilding`~~ | ||
Updates a building's details. | ||
#### Arguments: | ||
- `buildingID: Int!` - ID of the building. | ||
- `building: NewBuilding!` - Updated details of the building. | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
updateBuilding(buildingID: 1, building: { | ||
name: "Science Building" | ||
street: "123 Main St" | ||
number: "1" | ||
city: "Example City" | ||
zip: 12345 | ||
osm: "updated-osm-link" | ||
}) | ||
} | ||
``` | ||
|
||
### `deleteBuilding` | ||
Deletes a list of buildings. *Note: This also deletes all rooms in the buildings* | ||
#### Arguments: | ||
- `buildingID: [Int!]!` - IDs of buildings | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
deleteBuilding(buildingID: [1, 2]) | ||
} | ||
``` | ||
|
||
### `addRoom` | ||
Adds a new room. | ||
#### Arguments: | ||
|
@@ -308,23 +364,16 @@ mutation { | |
} | ||
``` | ||
|
||
### ~~`updateBuilding`~~ | ||
Updates a building's details. | ||
### `deleteRoom` | ||
Deletes a room in a building. | ||
#### Arguments: | ||
- `buildingID: Int!` - ID of the building. | ||
- `building: NewBuilding!` - Updated details of the building. | ||
- `roomNumber: String!` - Number of room | ||
- `buildingID: [Int!]!` - IDs of buildings | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
updateBuilding(buildingID: 1, building: { | ||
name: "Science Building" | ||
street: "123 Main St" | ||
number: "1" | ||
city: "Example City" | ||
zip: 12345 | ||
osm: "updated-osm-link" | ||
}) | ||
deleteRoom(roomNumber: "101", buildingID: 1) | ||
} | ||
``` | ||
|
||
|
@@ -343,23 +392,51 @@ mutation { | |
} | ||
``` | ||
|
||
### `linkAvailableRoomToEvent` | ||
### `deleteTopic` | ||
Deletes a list of topics. *Note: This also deletes all events related to it* | ||
#### Arguments: | ||
- `name: [String!]!` - Names of topics | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
deleteTopic(name: "Math") | ||
} | ||
``` | ||
|
||
### `addAvailableRoomToEvent` | ||
Links an available room to an event. | ||
#### Arguments: | ||
- `link: NewRoomToEventLink!` - Details of the room-event link. | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
linkAvailableRoomToEvent(link: { | ||
addAvailableRoomToEvent(link: { | ||
eventID: 1 | ||
roomNumber: "101" | ||
buildingID: 1 | ||
}) | ||
} | ||
``` | ||
|
||
### `linkTutorToEventAndRoom` | ||
### `deleteRoomFromEvent` | ||
Unmarks a room as available for an event. | ||
#### Arguments: | ||
- `link: NewRoomToEventLink!` - Details of the room-event link. | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
deleteRoomFromEvent(link: { | ||
eventID: 1 | ||
roomNumber: "101" | ||
buildingID: 1 | ||
}) | ||
} | ||
``` | ||
|
||
### `assignTutorToEvent` | ||
Links a tutor to an event and room. | ||
#### Arguments: | ||
- `link: NewEventToTutorLink!` - Details of the tutor-event-room link. | ||
|
@@ -375,3 +452,20 @@ mutation { | |
}) | ||
} | ||
``` | ||
|
||
### `unassignTutorFromEvent` | ||
Unassign a tutor from an event and room. | ||
#### Arguments: | ||
- `link: NewEventToTutorLink!` - Details of the tutor-event-room link. | ||
|
||
#### Example: | ||
```graphql | ||
mutation { | ||
unassignTutorFromEvent(link: { | ||
eventID: 1 | ||
tutorMail: "[email protected]" | ||
roomNumber: "101" | ||
buildingID: 1 | ||
}) | ||
} | ||
``` |