decidim-bulletin_board 0.8.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +4 -1
- data/CHANGELOG.md +41 -1
- data/Gemfile.lock +59 -58
- data/app/assets/javascripts/decidim/bulletin_board/decidim-bulletin_board.js +279 -2
- data/bin/release +8 -0
- data/lib/decidim/bulletin_board.rb +13 -17
- data/lib/decidim/bulletin_board/authority/create_election.rb +121 -16
- data/lib/decidim/bulletin_board/authority/end_vote.rb +57 -0
- data/lib/decidim/bulletin_board/authority/get_election_results.rb +63 -0
- data/lib/decidim/bulletin_board/authority/get_election_status.rb +12 -11
- data/lib/decidim/bulletin_board/authority/publish_results.rb +22 -16
- data/lib/decidim/bulletin_board/authority/start_key_ceremony.rb +57 -0
- data/lib/decidim/bulletin_board/authority/start_tally.rb +22 -16
- data/lib/decidim/bulletin_board/authority/start_vote.rb +57 -0
- data/lib/decidim/bulletin_board/client.rb +58 -48
- data/lib/decidim/bulletin_board/command.rb +11 -26
- data/lib/decidim/bulletin_board/graphql/bb_schema.json +205 -87
- data/lib/decidim/bulletin_board/graphql/factory.rb +18 -0
- data/lib/decidim/bulletin_board/settings.rb +49 -0
- data/lib/decidim/bulletin_board/version.rb +1 -1
- data/lib/decidim/bulletin_board/voter/cast_vote.rb +13 -8
- data/lib/decidim/bulletin_board/voter/get_pending_message_status.rb +1 -1
- metadata +9 -8
- data/app/assets/javascripts/decidim/bulletin_board/decidim-bulletin_board.dev.js +0 -18038
- data/lib/decidim/bulletin_board/authority.rb +0 -8
- data/lib/decidim/bulletin_board/authority/close_ballot_box.rb +0 -51
- data/lib/decidim/bulletin_board/authority/open_ballot_box.rb +0 -51
- data/lib/decidim/bulletin_board/graphql/client.rb +0 -18
- data/lib/decidim/bulletin_board/voter.rb +0 -4
@@ -12,6 +12,11 @@ module Decidim
|
|
12
12
|
@election_id = election_id
|
13
13
|
end
|
14
14
|
|
15
|
+
# Returns the message_id related to the operation
|
16
|
+
def message_id
|
17
|
+
@message_id ||= build_message_id(unique_election_id(election_id), "start_tally")
|
18
|
+
end
|
19
|
+
|
15
20
|
# Executes the command. Broadcasts these events:
|
16
21
|
#
|
17
22
|
# - :ok when everything is valid and the query operation is successful.
|
@@ -19,27 +24,28 @@ module Decidim
|
|
19
24
|
#
|
20
25
|
# Returns nothing.
|
21
26
|
def call
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
27
|
+
# arguments used inside the graphql operation
|
28
|
+
args = {
|
29
|
+
message_id: message_id,
|
30
|
+
signed_data: sign_message(message_id, {})
|
31
|
+
}
|
32
|
+
|
33
|
+
response = graphql.query do
|
34
|
+
mutation do
|
35
|
+
startTally(messageId: args[:message_id], signedData: args[:signed_data]) do
|
36
|
+
pendingMessage do
|
37
|
+
status
|
33
38
|
end
|
39
|
+
error
|
34
40
|
end
|
35
41
|
end
|
42
|
+
end
|
36
43
|
|
37
|
-
|
44
|
+
return broadcast(:error, response.data.start_tally.error) if response.data.start_tally.error.present?
|
38
45
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
end
|
46
|
+
broadcast(:ok, response.data.start_tally.pending_message)
|
47
|
+
rescue Graphlient::Errors::ServerError
|
48
|
+
broadcast(:error, "Sorry, something went wrong")
|
43
49
|
end
|
44
50
|
|
45
51
|
private
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Decidim
|
4
|
+
module BulletinBoard
|
5
|
+
module Authority
|
6
|
+
# This command uses the GraphQL client to request the starting of the voting period.
|
7
|
+
class StartVote < Decidim::BulletinBoard::Command
|
8
|
+
# Public: Initializes the command.
|
9
|
+
#
|
10
|
+
# election_id - The local election identifier
|
11
|
+
def initialize(election_id)
|
12
|
+
@election_id = election_id
|
13
|
+
end
|
14
|
+
|
15
|
+
# Returns the message_id related to the operation
|
16
|
+
def message_id
|
17
|
+
@message_id ||= build_message_id(unique_election_id(election_id), "start_vote")
|
18
|
+
end
|
19
|
+
|
20
|
+
# Executes the command. Broadcasts these events:
|
21
|
+
#
|
22
|
+
# - :ok when everything is valid and the query operation is successful.
|
23
|
+
# - :error if query operation was not successful.
|
24
|
+
#
|
25
|
+
# Returns nothing.
|
26
|
+
def call
|
27
|
+
# arguments used inside the graphql operation
|
28
|
+
args = {
|
29
|
+
message_id: message_id,
|
30
|
+
signed_data: sign_message(message_id, {})
|
31
|
+
}
|
32
|
+
|
33
|
+
response = graphql.query do
|
34
|
+
mutation do
|
35
|
+
startVote(messageId: args[:message_id], signedData: args[:signed_data]) do
|
36
|
+
pendingMessage do
|
37
|
+
status
|
38
|
+
end
|
39
|
+
error
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
return broadcast(:error, response.data.start_vote.error) if response.data.start_vote.error.present?
|
45
|
+
|
46
|
+
broadcast(:ok, response.data.start_vote.pending_message)
|
47
|
+
rescue Graphlient::Errors::FaradayServerError
|
48
|
+
broadcast(:error, "Sorry, something went wrong")
|
49
|
+
end
|
50
|
+
|
51
|
+
private
|
52
|
+
|
53
|
+
attr_reader :election_id
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
@@ -1,94 +1,103 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "decidim/bulletin_board/command"
|
4
|
+
require "decidim/bulletin_board/graphql/factory"
|
5
|
+
require "decidim/bulletin_board/settings"
|
6
|
+
|
7
|
+
require "decidim/bulletin_board/authority/create_election"
|
8
|
+
require "decidim/bulletin_board/authority/end_vote"
|
9
|
+
require "decidim/bulletin_board/authority/get_election_status"
|
10
|
+
require "decidim/bulletin_board/authority/start_key_ceremony"
|
11
|
+
require "decidim/bulletin_board/authority/start_tally"
|
12
|
+
require "decidim/bulletin_board/authority/start_vote"
|
13
|
+
require "decidim/bulletin_board/authority/publish_results"
|
14
|
+
require "decidim/bulletin_board/authority/get_election_results"
|
15
|
+
require "decidim/bulletin_board/voter/cast_vote"
|
16
|
+
require "decidim/bulletin_board/voter/get_pending_message_status"
|
4
17
|
|
5
18
|
module Decidim
|
6
19
|
module BulletinBoard
|
7
20
|
# The Bulletin Board client
|
8
21
|
class Client
|
9
|
-
def initialize
|
10
|
-
@
|
11
|
-
@
|
12
|
-
@scheme = BulletinBoard.scheme.presence
|
13
|
-
@authority_name = BulletinBoard.authority_name.presence
|
14
|
-
@number_of_trustees = BulletinBoard.number_of_trustees.presence
|
15
|
-
@identification_private_key = BulletinBoard.identification_private_key.presence
|
16
|
-
@private_key = identification_private_key_content if identification_private_key
|
22
|
+
def initialize(config = Decidim::BulletinBoard)
|
23
|
+
@settings = Settings.new(config)
|
24
|
+
@graphql = Graphql::Factory.client_for(settings)
|
17
25
|
end
|
18
26
|
|
19
|
-
|
20
|
-
|
21
|
-
delegate :authority_slug, to: Decidim::BulletinBoard::Command
|
22
|
-
|
23
|
-
def quorum
|
24
|
-
return 0 if @scheme.dig(:parameters, :quorum).blank?
|
25
|
-
|
26
|
-
@scheme.dig(:parameters, :quorum)
|
27
|
-
end
|
28
|
-
|
29
|
-
def public_key
|
30
|
-
private_key&.export
|
31
|
-
end
|
32
|
-
|
33
|
-
def configured?
|
34
|
-
private_key && server && api_key
|
35
|
-
end
|
27
|
+
delegate :configured?, :server, :public_key, :authority_name, :number_of_trustees, :quorum, to: :settings
|
36
28
|
|
37
29
|
def create_election(election_id, election_data)
|
38
|
-
create_election =
|
30
|
+
create_election = configure Authority::CreateElection.new(election_id, election_data)
|
31
|
+
yield create_election.message_id if block_given?
|
39
32
|
create_election.on(:ok) { |election| return election }
|
40
33
|
create_election.on(:error) { |error_message| raise StandardError, error_message }
|
41
34
|
create_election.call
|
42
35
|
end
|
43
36
|
|
44
|
-
def
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
def close_ballot_box(election_id)
|
52
|
-
close_ballot_box = Decidim::BulletinBoard::Authority::CloseBallotBox.new(election_id)
|
53
|
-
close_ballot_box.on(:ok) { |election| return election }
|
54
|
-
close_ballot_box.on(:error) { |error_message| raise StandardError, error_message }
|
55
|
-
close_ballot_box.call
|
37
|
+
def start_key_ceremony(election_id)
|
38
|
+
start_key_ceremony = configure Authority::StartKeyCeremony.new(election_id)
|
39
|
+
yield start_key_ceremony.message_id if block_given?
|
40
|
+
start_key_ceremony.on(:ok) { |pending_message| return pending_message }
|
41
|
+
start_key_ceremony.on(:error) { |error_message| raise StandardError, error_message }
|
42
|
+
start_key_ceremony.call
|
56
43
|
end
|
57
44
|
|
58
|
-
def
|
59
|
-
|
45
|
+
def start_vote(election_id)
|
46
|
+
start_vote = configure Authority::StartVote.new(election_id)
|
47
|
+
yield start_vote.message_id if block_given?
|
48
|
+
start_vote.on(:ok) { |pending_message| return pending_message }
|
49
|
+
start_vote.on(:error) { |error_message| raise StandardError, error_message }
|
50
|
+
start_vote.call
|
60
51
|
end
|
61
52
|
|
62
53
|
def cast_vote(election_id, voter_id, encrypted_vote)
|
63
|
-
cast_vote =
|
54
|
+
cast_vote = configure Voter::CastVote.new(election_id, voter_id, encrypted_vote)
|
55
|
+
yield cast_vote.message_id if block_given?
|
64
56
|
cast_vote.on(:ok) { |pending_message| return pending_message }
|
65
57
|
cast_vote.on(:error) { |error_message| raise StandardError, error_message }
|
66
58
|
cast_vote.call
|
67
59
|
end
|
68
60
|
|
69
61
|
def get_pending_message_status(message_id)
|
70
|
-
get_pending_message_status =
|
62
|
+
get_pending_message_status = configure Voter::GetPendingMessageStatus.new(message_id)
|
71
63
|
get_pending_message_status.on(:ok) { |status| return status }
|
72
64
|
get_pending_message_status.on(:error) { |error_message| raise StandardError, error_message }
|
73
65
|
get_pending_message_status.call
|
74
66
|
end
|
75
67
|
|
68
|
+
def end_vote(election_id)
|
69
|
+
end_vote = configure Authority::EndVote.new(election_id)
|
70
|
+
yield end_vote.message_id if block_given?
|
71
|
+
end_vote.on(:ok) { |pending_message| return pending_message }
|
72
|
+
end_vote.on(:error) { |error_message| raise StandardError, error_message }
|
73
|
+
end_vote.call
|
74
|
+
end
|
75
|
+
|
76
76
|
def get_election_status(election_id)
|
77
|
-
get_election_status =
|
77
|
+
get_election_status = configure Authority::GetElectionStatus.new(election_id)
|
78
78
|
get_election_status.on(:ok) { |status| return status }
|
79
79
|
get_election_status.on(:error) { |error_message| raise StandardError, error_message }
|
80
80
|
get_election_status.call
|
81
81
|
end
|
82
82
|
|
83
83
|
def start_tally(election_id)
|
84
|
-
start_tally =
|
84
|
+
start_tally = configure Authority::StartTally.new(election_id)
|
85
|
+
yield start_tally.message_id if block_given?
|
85
86
|
start_tally.on(:ok) { |pending_message| return pending_message }
|
86
87
|
start_tally.on(:error) { |error_message| raise StandardError, error_message }
|
87
88
|
start_tally.call
|
88
89
|
end
|
89
90
|
|
91
|
+
def get_election_results(election_id)
|
92
|
+
get_log_entries = configure Authority::GetElectionResults.new(election_id)
|
93
|
+
get_log_entries.on(:ok) { |result| return result }
|
94
|
+
get_log_entries.on(:error) { |error_message| raise StandardError, error_message }
|
95
|
+
get_log_entries.call
|
96
|
+
end
|
97
|
+
|
90
98
|
def publish_results(election_id)
|
91
|
-
publish_results =
|
99
|
+
publish_results = configure Authority::PublishResults.new(election_id)
|
100
|
+
yield publish_results.message_id if block_given?
|
92
101
|
publish_results.on(:ok) { |status| return status }
|
93
102
|
publish_results.on(:error) { |error_message| raise StandardError, error_message }
|
94
103
|
publish_results.call
|
@@ -96,10 +105,11 @@ module Decidim
|
|
96
105
|
|
97
106
|
private
|
98
107
|
|
99
|
-
attr_reader :
|
108
|
+
attr_reader :settings, :graphql
|
100
109
|
|
101
|
-
def
|
102
|
-
|
110
|
+
def configure(command)
|
111
|
+
command.configure(settings, graphql)
|
112
|
+
command
|
103
113
|
end
|
104
114
|
end
|
105
115
|
end
|
@@ -1,21 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "decidim/bulletin_board/graphql/client"
|
4
|
-
|
5
3
|
module Decidim
|
6
4
|
module BulletinBoard
|
7
5
|
# The base class for all commands.
|
8
6
|
class Command
|
9
7
|
include Wisper::Publisher
|
10
8
|
|
11
|
-
|
9
|
+
attr_reader :settings, :graphql
|
12
10
|
|
13
|
-
def
|
14
|
-
|
11
|
+
def configure(settings, graphql)
|
12
|
+
@settings = settings
|
13
|
+
@graphql = graphql
|
15
14
|
end
|
16
15
|
|
17
|
-
def
|
18
|
-
|
16
|
+
def sign_message(message_id, message)
|
17
|
+
JWT.encode(complete_message(message_id, message), settings.private_key.keypair, "RS256")
|
19
18
|
end
|
20
19
|
|
21
20
|
def complete_message(message_id, message)
|
@@ -25,26 +24,12 @@ module Decidim
|
|
25
24
|
})
|
26
25
|
end
|
27
26
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
end
|
32
|
-
|
33
|
-
def private_key
|
34
|
-
@private_key ||= JwkUtils.import_private_key(BulletinBoard.identification_private_key)
|
35
|
-
end
|
36
|
-
|
37
|
-
def authority_slug
|
38
|
-
@authority_slug ||= BulletinBoard.authority_name.parameterize
|
39
|
-
end
|
40
|
-
|
41
|
-
def unique_election_id(election_id)
|
42
|
-
Decidim::BulletinBoard::MessageIdentifier.unique_election_id(authority_slug, election_id)
|
43
|
-
end
|
27
|
+
def build_message_id(unique_election_id, type_subtype, voter_id = nil)
|
28
|
+
MessageIdentifier.format(unique_election_id, type_subtype, voter_id ? :voter : :authority, voter_id || settings.authority_slug)
|
29
|
+
end
|
44
30
|
|
45
|
-
|
46
|
-
|
47
|
-
end
|
31
|
+
def unique_election_id(election_id)
|
32
|
+
MessageIdentifier.unique_election_id(settings.authority_slug, election_id)
|
48
33
|
end
|
49
34
|
end
|
50
35
|
end
|
@@ -114,47 +114,6 @@
|
|
114
114
|
"enumValues": null,
|
115
115
|
"possibleTypes": null
|
116
116
|
},
|
117
|
-
{
|
118
|
-
"kind": "OBJECT",
|
119
|
-
"name": "CloseBallotBoxMutationPayload",
|
120
|
-
"description": "Autogenerated return type of CloseBallotBoxMutation",
|
121
|
-
"fields": [
|
122
|
-
{
|
123
|
-
"name": "election",
|
124
|
-
"description": null,
|
125
|
-
"args": [
|
126
|
-
|
127
|
-
],
|
128
|
-
"type": {
|
129
|
-
"kind": "OBJECT",
|
130
|
-
"name": "Election",
|
131
|
-
"ofType": null
|
132
|
-
},
|
133
|
-
"isDeprecated": false,
|
134
|
-
"deprecationReason": null
|
135
|
-
},
|
136
|
-
{
|
137
|
-
"name": "error",
|
138
|
-
"description": null,
|
139
|
-
"args": [
|
140
|
-
|
141
|
-
],
|
142
|
-
"type": {
|
143
|
-
"kind": "SCALAR",
|
144
|
-
"name": "String",
|
145
|
-
"ofType": null
|
146
|
-
},
|
147
|
-
"isDeprecated": false,
|
148
|
-
"deprecationReason": null
|
149
|
-
}
|
150
|
-
],
|
151
|
-
"inputFields": null,
|
152
|
-
"interfaces": [
|
153
|
-
|
154
|
-
],
|
155
|
-
"enumValues": null,
|
156
|
-
"possibleTypes": null
|
157
|
-
},
|
158
117
|
{
|
159
118
|
"kind": "OBJECT",
|
160
119
|
"name": "CreateElectionMutationPayload",
|
@@ -250,6 +209,24 @@
|
|
250
209
|
"ofType": null
|
251
210
|
},
|
252
211
|
"defaultValue": null
|
212
|
+
},
|
213
|
+
{
|
214
|
+
"name": "types",
|
215
|
+
"description": null,
|
216
|
+
"type": {
|
217
|
+
"kind": "LIST",
|
218
|
+
"name": null,
|
219
|
+
"ofType": {
|
220
|
+
"kind": "NON_NULL",
|
221
|
+
"name": null,
|
222
|
+
"ofType": {
|
223
|
+
"kind": "SCALAR",
|
224
|
+
"name": "String",
|
225
|
+
"ofType": null
|
226
|
+
}
|
227
|
+
}
|
228
|
+
},
|
229
|
+
"defaultValue": null
|
253
230
|
}
|
254
231
|
],
|
255
232
|
"type": {
|
@@ -301,7 +278,7 @@
|
|
301
278
|
"name": null,
|
302
279
|
"ofType": {
|
303
280
|
"kind": "SCALAR",
|
304
|
-
"name": "
|
281
|
+
"name": "JSON",
|
305
282
|
"ofType": null
|
306
283
|
}
|
307
284
|
},
|
@@ -342,6 +319,47 @@
|
|
342
319
|
"enumValues": null,
|
343
320
|
"possibleTypes": null
|
344
321
|
},
|
322
|
+
{
|
323
|
+
"kind": "OBJECT",
|
324
|
+
"name": "EndVoteMutationPayload",
|
325
|
+
"description": "Autogenerated return type of EndVoteMutation",
|
326
|
+
"fields": [
|
327
|
+
{
|
328
|
+
"name": "error",
|
329
|
+
"description": null,
|
330
|
+
"args": [
|
331
|
+
|
332
|
+
],
|
333
|
+
"type": {
|
334
|
+
"kind": "SCALAR",
|
335
|
+
"name": "String",
|
336
|
+
"ofType": null
|
337
|
+
},
|
338
|
+
"isDeprecated": false,
|
339
|
+
"deprecationReason": null
|
340
|
+
},
|
341
|
+
{
|
342
|
+
"name": "pendingMessage",
|
343
|
+
"description": null,
|
344
|
+
"args": [
|
345
|
+
|
346
|
+
],
|
347
|
+
"type": {
|
348
|
+
"kind": "OBJECT",
|
349
|
+
"name": "PendingMessage",
|
350
|
+
"ofType": null
|
351
|
+
},
|
352
|
+
"isDeprecated": false,
|
353
|
+
"deprecationReason": null
|
354
|
+
}
|
355
|
+
],
|
356
|
+
"inputFields": null,
|
357
|
+
"interfaces": [
|
358
|
+
|
359
|
+
],
|
360
|
+
"enumValues": null,
|
361
|
+
"possibleTypes": null
|
362
|
+
},
|
345
363
|
{
|
346
364
|
"kind": "SCALAR",
|
347
365
|
"name": "ID",
|
@@ -417,6 +435,24 @@
|
|
417
435
|
"isDeprecated": false,
|
418
436
|
"deprecationReason": null
|
419
437
|
},
|
438
|
+
{
|
439
|
+
"name": "decodedData",
|
440
|
+
"description": null,
|
441
|
+
"args": [
|
442
|
+
|
443
|
+
],
|
444
|
+
"type": {
|
445
|
+
"kind": "NON_NULL",
|
446
|
+
"name": null,
|
447
|
+
"ofType": {
|
448
|
+
"kind": "SCALAR",
|
449
|
+
"name": "JSON",
|
450
|
+
"ofType": null
|
451
|
+
}
|
452
|
+
},
|
453
|
+
"isDeprecated": false,
|
454
|
+
"deprecationReason": null
|
455
|
+
},
|
420
456
|
{
|
421
457
|
"name": "election",
|
422
458
|
"description": null,
|
@@ -611,7 +647,7 @@
|
|
611
647
|
"description": null,
|
612
648
|
"fields": [
|
613
649
|
{
|
614
|
-
"name": "
|
650
|
+
"name": "createElection",
|
615
651
|
"description": null,
|
616
652
|
"args": [
|
617
653
|
{
|
@@ -645,14 +681,14 @@
|
|
645
681
|
],
|
646
682
|
"type": {
|
647
683
|
"kind": "OBJECT",
|
648
|
-
"name": "
|
684
|
+
"name": "CreateElectionMutationPayload",
|
649
685
|
"ofType": null
|
650
686
|
},
|
651
687
|
"isDeprecated": false,
|
652
688
|
"deprecationReason": null
|
653
689
|
},
|
654
690
|
{
|
655
|
-
"name": "
|
691
|
+
"name": "endVote",
|
656
692
|
"description": null,
|
657
693
|
"args": [
|
658
694
|
{
|
@@ -686,14 +722,14 @@
|
|
686
722
|
],
|
687
723
|
"type": {
|
688
724
|
"kind": "OBJECT",
|
689
|
-
"name": "
|
725
|
+
"name": "EndVoteMutationPayload",
|
690
726
|
"ofType": null
|
691
727
|
},
|
692
728
|
"isDeprecated": false,
|
693
729
|
"deprecationReason": null
|
694
730
|
},
|
695
731
|
{
|
696
|
-
"name": "
|
732
|
+
"name": "processKeyCeremonyStep",
|
697
733
|
"description": null,
|
698
734
|
"args": [
|
699
735
|
{
|
@@ -727,14 +763,14 @@
|
|
727
763
|
],
|
728
764
|
"type": {
|
729
765
|
"kind": "OBJECT",
|
730
|
-
"name": "
|
766
|
+
"name": "ProcessKeyCeremonyStepMutationPayload",
|
731
767
|
"ofType": null
|
732
768
|
},
|
733
769
|
"isDeprecated": false,
|
734
770
|
"deprecationReason": null
|
735
771
|
},
|
736
772
|
{
|
737
|
-
"name": "
|
773
|
+
"name": "processTallyStep",
|
738
774
|
"description": null,
|
739
775
|
"args": [
|
740
776
|
{
|
@@ -768,14 +804,14 @@
|
|
768
804
|
],
|
769
805
|
"type": {
|
770
806
|
"kind": "OBJECT",
|
771
|
-
"name": "
|
807
|
+
"name": "ProcessTallyStepMutationPayload",
|
772
808
|
"ofType": null
|
773
809
|
},
|
774
810
|
"isDeprecated": false,
|
775
811
|
"deprecationReason": null
|
776
812
|
},
|
777
813
|
{
|
778
|
-
"name": "
|
814
|
+
"name": "publishResults",
|
779
815
|
"description": null,
|
780
816
|
"args": [
|
781
817
|
{
|
@@ -809,14 +845,14 @@
|
|
809
845
|
],
|
810
846
|
"type": {
|
811
847
|
"kind": "OBJECT",
|
812
|
-
"name": "
|
848
|
+
"name": "PublishResultsMutationPayload",
|
813
849
|
"ofType": null
|
814
850
|
},
|
815
851
|
"isDeprecated": false,
|
816
852
|
"deprecationReason": null
|
817
853
|
},
|
818
854
|
{
|
819
|
-
"name": "
|
855
|
+
"name": "startKeyCeremony",
|
820
856
|
"description": null,
|
821
857
|
"args": [
|
822
858
|
{
|
@@ -850,7 +886,7 @@
|
|
850
886
|
],
|
851
887
|
"type": {
|
852
888
|
"kind": "OBJECT",
|
853
|
-
"name": "
|
889
|
+
"name": "StartKeyCeremonyMutationPayload",
|
854
890
|
"ofType": null
|
855
891
|
},
|
856
892
|
"isDeprecated": false,
|
@@ -898,7 +934,7 @@
|
|
898
934
|
"deprecationReason": null
|
899
935
|
},
|
900
936
|
{
|
901
|
-
"name": "
|
937
|
+
"name": "startVote",
|
902
938
|
"description": null,
|
903
939
|
"args": [
|
904
940
|
{
|
@@ -932,48 +968,48 @@
|
|
932
968
|
],
|
933
969
|
"type": {
|
934
970
|
"kind": "OBJECT",
|
935
|
-
"name": "
|
936
|
-
"ofType": null
|
937
|
-
},
|
938
|
-
"isDeprecated": false,
|
939
|
-
"deprecationReason": null
|
940
|
-
}
|
941
|
-
],
|
942
|
-
"inputFields": null,
|
943
|
-
"interfaces": [
|
944
|
-
|
945
|
-
],
|
946
|
-
"enumValues": null,
|
947
|
-
"possibleTypes": null
|
948
|
-
},
|
949
|
-
{
|
950
|
-
"kind": "OBJECT",
|
951
|
-
"name": "OpenBallotBoxMutationPayload",
|
952
|
-
"description": "Autogenerated return type of OpenBallotBoxMutation",
|
953
|
-
"fields": [
|
954
|
-
{
|
955
|
-
"name": "election",
|
956
|
-
"description": null,
|
957
|
-
"args": [
|
958
|
-
|
959
|
-
],
|
960
|
-
"type": {
|
961
|
-
"kind": "OBJECT",
|
962
|
-
"name": "Election",
|
971
|
+
"name": "StartVoteMutationPayload",
|
963
972
|
"ofType": null
|
964
973
|
},
|
965
974
|
"isDeprecated": false,
|
966
975
|
"deprecationReason": null
|
967
976
|
},
|
968
977
|
{
|
969
|
-
"name": "
|
978
|
+
"name": "vote",
|
970
979
|
"description": null,
|
971
980
|
"args": [
|
972
|
-
|
981
|
+
{
|
982
|
+
"name": "messageId",
|
983
|
+
"description": null,
|
984
|
+
"type": {
|
985
|
+
"kind": "NON_NULL",
|
986
|
+
"name": null,
|
987
|
+
"ofType": {
|
988
|
+
"kind": "SCALAR",
|
989
|
+
"name": "String",
|
990
|
+
"ofType": null
|
991
|
+
}
|
992
|
+
},
|
993
|
+
"defaultValue": null
|
994
|
+
},
|
995
|
+
{
|
996
|
+
"name": "signedData",
|
997
|
+
"description": null,
|
998
|
+
"type": {
|
999
|
+
"kind": "NON_NULL",
|
1000
|
+
"name": null,
|
1001
|
+
"ofType": {
|
1002
|
+
"kind": "SCALAR",
|
1003
|
+
"name": "String",
|
1004
|
+
"ofType": null
|
1005
|
+
}
|
1006
|
+
},
|
1007
|
+
"defaultValue": null
|
1008
|
+
}
|
973
1009
|
],
|
974
1010
|
"type": {
|
975
|
-
"kind": "
|
976
|
-
"name": "
|
1011
|
+
"kind": "OBJECT",
|
1012
|
+
"name": "VoteMutationPayload",
|
977
1013
|
"ofType": null
|
978
1014
|
},
|
979
1015
|
"isDeprecated": false,
|
@@ -1415,6 +1451,47 @@
|
|
1415
1451
|
"enumValues": null,
|
1416
1452
|
"possibleTypes": null
|
1417
1453
|
},
|
1454
|
+
{
|
1455
|
+
"kind": "OBJECT",
|
1456
|
+
"name": "StartKeyCeremonyMutationPayload",
|
1457
|
+
"description": "Autogenerated return type of StartKeyCeremonyMutation",
|
1458
|
+
"fields": [
|
1459
|
+
{
|
1460
|
+
"name": "error",
|
1461
|
+
"description": null,
|
1462
|
+
"args": [
|
1463
|
+
|
1464
|
+
],
|
1465
|
+
"type": {
|
1466
|
+
"kind": "SCALAR",
|
1467
|
+
"name": "String",
|
1468
|
+
"ofType": null
|
1469
|
+
},
|
1470
|
+
"isDeprecated": false,
|
1471
|
+
"deprecationReason": null
|
1472
|
+
},
|
1473
|
+
{
|
1474
|
+
"name": "pendingMessage",
|
1475
|
+
"description": null,
|
1476
|
+
"args": [
|
1477
|
+
|
1478
|
+
],
|
1479
|
+
"type": {
|
1480
|
+
"kind": "OBJECT",
|
1481
|
+
"name": "PendingMessage",
|
1482
|
+
"ofType": null
|
1483
|
+
},
|
1484
|
+
"isDeprecated": false,
|
1485
|
+
"deprecationReason": null
|
1486
|
+
}
|
1487
|
+
],
|
1488
|
+
"inputFields": null,
|
1489
|
+
"interfaces": [
|
1490
|
+
|
1491
|
+
],
|
1492
|
+
"enumValues": null,
|
1493
|
+
"possibleTypes": null
|
1494
|
+
},
|
1418
1495
|
{
|
1419
1496
|
"kind": "OBJECT",
|
1420
1497
|
"name": "StartTallyMutationPayload",
|
@@ -1456,6 +1533,47 @@
|
|
1456
1533
|
"enumValues": null,
|
1457
1534
|
"possibleTypes": null
|
1458
1535
|
},
|
1536
|
+
{
|
1537
|
+
"kind": "OBJECT",
|
1538
|
+
"name": "StartVoteMutationPayload",
|
1539
|
+
"description": "Autogenerated return type of StartVoteMutation",
|
1540
|
+
"fields": [
|
1541
|
+
{
|
1542
|
+
"name": "error",
|
1543
|
+
"description": null,
|
1544
|
+
"args": [
|
1545
|
+
|
1546
|
+
],
|
1547
|
+
"type": {
|
1548
|
+
"kind": "SCALAR",
|
1549
|
+
"name": "String",
|
1550
|
+
"ofType": null
|
1551
|
+
},
|
1552
|
+
"isDeprecated": false,
|
1553
|
+
"deprecationReason": null
|
1554
|
+
},
|
1555
|
+
{
|
1556
|
+
"name": "pendingMessage",
|
1557
|
+
"description": null,
|
1558
|
+
"args": [
|
1559
|
+
|
1560
|
+
],
|
1561
|
+
"type": {
|
1562
|
+
"kind": "OBJECT",
|
1563
|
+
"name": "PendingMessage",
|
1564
|
+
"ofType": null
|
1565
|
+
},
|
1566
|
+
"isDeprecated": false,
|
1567
|
+
"deprecationReason": null
|
1568
|
+
}
|
1569
|
+
],
|
1570
|
+
"inputFields": null,
|
1571
|
+
"interfaces": [
|
1572
|
+
|
1573
|
+
],
|
1574
|
+
"enumValues": null,
|
1575
|
+
"possibleTypes": null
|
1576
|
+
},
|
1459
1577
|
{
|
1460
1578
|
"kind": "SCALAR",
|
1461
1579
|
"name": "String",
|