OBJECT

Mutation

link GraphQL Schema definition

1type Mutation {
2
3# A mutation to register an User
4#
5# Arguments
6# username: Unique User identifier
7# name: User's full name
8# email: Unique User's e-mail
9# password: User password
10createUser(
11username: String!,
12name: String!,
13email: String!,
14password: String!
15): User
16
17# A mutation to update User data (Only internal user)
18#
19# Arguments
20# name: The new name of the User
21# password: The new password of the User
22# email: The new email of the User
23updateUser(name: String, password: String, email: String): User
24
25# A mutation to upload the user profile picture
26#
27# Arguments
28# image: Picture upload in a multipart upload request
29uploadUserImage(image: Upload): User
30
31# A mutation to update the attribute csvDownloadEnabled of the User
32#
33# Arguments
34# csvDownloadEnabled: Attribute csvDownloadEnabled
35updateCsvDownloadEnabled(csvDownloadEnabled: Boolean!): User
36
37# A mutation to update the attribute preferredAirStation of the User
38#
39# Arguments
40# idAirStation: Attribute idAirStation
41updateUserAirStation(idAirStation: Int!): User
42
43# A mutation to update the attribute preferredWaterStation of the User
44#
45# Arguments
46# idWaterStation: Attribute idWaterStation
47updateUserWaterStation(idWaterStation: Int!): User
48
49# A mutation to update the attribute pollenThreshold of the User
50#
51# Arguments
52# idPollenMeasure: Attribute idPollenMeasure
53# pollenValue: Threshold value for the pollen
54updateUserPollenThreshold(
55idPollenMeasure: String!,
56pollenValue: String!
57): User
58
59# A mutation to update the attribute pollenThreshold of the User
60#
61# Arguments
62# idAirStation: Attribute idAirStation
63# airContaminant: Type of contaminant for the air
64# airValue: Threshold value for the air value
65updateUserAirThreshold(
66idAirStation: Int!,
67airContaminant: Contaminant!,
68airValue: Float!
69): User
70
71# A mutation to create a Feed
72#
73# Arguments
74# title: Title of the feeed
75# body: Body text of the feed
76# pictures: Pictures upload of the feed in a multipart upload
77# request
78submitFeed(title: String!, body: String!, pictures: [Upload!]): Feed
79
80# A mutation to change a user's opinion about a feed
81#
82# Arguments
83# id: Unique id of the feed
84# status: Opinion of the user
85toggleFeedOpinion(id: String!, status: Opinion): Feed
86
87# A mutation to change a user's opinion about a feed
88#
89# Arguments
90# id: Unique identifier of the feed
91# body: Body of the comment
92submitComment(id: String!, body: String!): Feed
93
94# A mutation to ban or unban an user (Admin only)
95#
96# Arguments
97# username: Unique User identifier to be retrieved
98# status: The status of the user account
99updateUserStatus(username: String!, status: UserStatus!): User
100
101# A mutation to change the settings water status
102#
103# Arguments
104# id: The id of the configuration
105# waterStatus: The status of the user account
106updateWaterStatus(id: String!, waterStatus: Boolean!): Settings
107
108# A mutation to change the settings air status
109#
110# Arguments
111# id: The id of the configuration
112# airStatus: The status of the user account
113updateAirStatus(id: String!, airStatus: Boolean!): Settings
114
115# A mutation to change the settings pollen status
116#
117# Arguments
118# id: The id of the configuration
119# pollenStatus: The status of the user account
120updatePollenStatus(id: String!, pollenStatus: Boolean!): Settings
121
122# A mutation to suscribe a client token
123#
124# Arguments
125# token: The client token to suscribe
126suscribeClient(token: String!): Boolean
127
128# A mutation to send a broadcast alert (Admin only)
129#
130# Arguments
131# title: Title of the alert
132# body: Body text of the alert
133# level: Warning level of the alert
134sendAlert(title: String!, body: String!, level: Level): Alert
135
136}

link Required by

This element is not required by anyone