decidim-bulletin_board 0.6.1 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 start the tally process.
7
+ class StartTally < 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_tally")
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 = client.query do
34
+ mutation do
35
+ startTally(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_tally.error) if response.data.start_tally.error.present?
45
+
46
+ broadcast(:ok, response.data.start_tally.pending_message)
47
+ rescue Graphlient::Errors::ServerError
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
@@ -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 = client.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
@@ -21,9 +21,7 @@ module Decidim
21
21
  delegate :authority_slug, to: Decidim::BulletinBoard::Command
22
22
 
23
23
  def quorum
24
- return 0 if @scheme.dig(:parameters, :quorum).blank?
25
-
26
- @scheme.dig(:parameters, :quorum)
24
+ @scheme.dig(:parameters, :quorum) || number_of_trustees
27
25
  end
28
26
 
29
27
  def public_key
@@ -36,37 +34,79 @@ module Decidim
36
34
 
37
35
  def create_election(election_id, election_data)
38
36
  create_election = Decidim::BulletinBoard::Authority::CreateElection.new(election_id, election_data)
37
+ yield create_election.message_id if block_given?
39
38
  create_election.on(:ok) { |election| return election }
40
39
  create_election.on(:error) { |error_message| raise StandardError, error_message }
41
40
  create_election.call
42
41
  end
43
42
 
44
- def open_ballot_box(election_id)
45
- open_ballot_box = Decidim::BulletinBoard::Authority::OpenBallotBox.new(election_id)
46
- open_ballot_box.on(:ok) { |election| return election }
47
- open_ballot_box.on(:error) { |error_message| raise StandardError, error_message }
48
- open_ballot_box.call
43
+ def start_key_ceremony(election_id)
44
+ start_key_ceremony = Decidim::BulletinBoard::Authority::StartKeyCeremony.new(election_id)
45
+ yield start_key_ceremony.message_id if block_given?
46
+ start_key_ceremony.on(:ok) { |pending_message| return pending_message }
47
+ start_key_ceremony.on(:error) { |error_message| raise StandardError, error_message }
48
+ start_key_ceremony.call
49
49
  end
50
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
51
+ def start_vote(election_id)
52
+ start_vote = Decidim::BulletinBoard::Authority::StartVote.new(election_id)
53
+ yield start_vote.message_id if block_given?
54
+ start_vote.on(:ok) { |pending_message| return pending_message }
55
+ start_vote.on(:error) { |error_message| raise StandardError, error_message }
56
+ start_vote.call
56
57
  end
57
58
 
58
59
  def cast_vote(election_id, voter_id, encrypted_vote)
59
60
  cast_vote = Decidim::BulletinBoard::Voter::CastVote.new(election_id, voter_id, encrypted_vote)
61
+ yield cast_vote.message_id if block_given?
60
62
  cast_vote.on(:ok) { |pending_message| return pending_message }
61
63
  cast_vote.on(:error) { |error_message| raise StandardError, error_message }
62
64
  cast_vote.call
63
65
  end
64
66
 
65
- def get_status(election_id)
66
- get_status = Decidim::BulletinBoard::Authority::GetElectionStatus.new(election_id)
67
- get_status.on(:ok) { |status| return status }
68
- get_status.on(:error) { |error_message| raise StandardError, error_message }
69
- get_status.call
67
+ def get_pending_message_status(message_id)
68
+ get_pending_message_status = Decidim::BulletinBoard::Voter::GetPendingMessageStatus.new(message_id)
69
+ get_pending_message_status.on(:ok) { |status| return status }
70
+ get_pending_message_status.on(:error) { |error_message| raise StandardError, error_message }
71
+ get_pending_message_status.call
72
+ end
73
+
74
+ def end_vote(election_id)
75
+ end_vote = Decidim::BulletinBoard::Authority::EndVote.new(election_id)
76
+ yield end_vote.message_id if block_given?
77
+ end_vote.on(:ok) { |pending_message| return pending_message }
78
+ end_vote.on(:error) { |error_message| raise StandardError, error_message }
79
+ end_vote.call
80
+ end
81
+
82
+ def get_election_status(election_id)
83
+ get_election_status = Decidim::BulletinBoard::Authority::GetElectionStatus.new(election_id)
84
+ get_election_status.on(:ok) { |status| return status }
85
+ get_election_status.on(:error) { |error_message| raise StandardError, error_message }
86
+ get_election_status.call
87
+ end
88
+
89
+ def start_tally(election_id)
90
+ start_tally = Decidim::BulletinBoard::Authority::StartTally.new(election_id)
91
+ yield start_tally.message_id if block_given?
92
+ start_tally.on(:ok) { |pending_message| return pending_message }
93
+ start_tally.on(:error) { |error_message| raise StandardError, error_message }
94
+ start_tally.call
95
+ end
96
+
97
+ def get_election_log_entries_by_types(election_id, types)
98
+ get_log_entries = Decidim::BulletinBoard::Authority::GetElectionLogEntriesByTypes.new(election_id, types)
99
+ get_log_entries.on(:ok) { |log_entries| return log_entries }
100
+ get_log_entries.on(:error) { |error_message| raise StandardError, error_message }
101
+ get_log_entries.call
102
+ end
103
+
104
+ def publish_results(election_id)
105
+ publish_results = Decidim::BulletinBoard::Authority::PublishResults.new(election_id)
106
+ yield publish_results.message_id if block_given?
107
+ publish_results.on(:ok) { |status| return status }
108
+ publish_results.on(:error) { |error_message| raise StandardError, error_message }
109
+ publish_results.call
70
110
  end
71
111
 
72
112
  private
@@ -8,15 +8,7 @@ module Decidim
8
8
  class Command
9
9
  include Wisper::Publisher
10
10
 
11
- delegate :authority_slug, :private_key, to: :class
12
-
13
- def unique_election_id(election_id)
14
- Decidim::BulletinBoard::MessageIdentifier.unique_election_id(authority_slug, election_id)
15
- end
16
-
17
- def message_id(unique_election_id, type_subtype, voter_id = nil)
18
- Decidim::BulletinBoard::MessageIdentifier.format(unique_election_id, type_subtype, voter_id ? :voter : :authority, voter_id || authority_slug)
19
- end
11
+ delegate :authority_slug, :private_key, :unique_election_id, :build_message_id, to: :class
20
12
 
21
13
  def sign_message(message_id, message)
22
14
  JWT.encode(complete_message(message_id, message), private_key.keypair, "RS256")
@@ -45,6 +37,14 @@ module Decidim
45
37
  def authority_slug
46
38
  @authority_slug ||= BulletinBoard.authority_name.parameterize
47
39
  end
40
+
41
+ def unique_election_id(election_id)
42
+ Decidim::BulletinBoard::MessageIdentifier.unique_election_id(authority_slug, election_id)
43
+ end
44
+
45
+ def build_message_id(unique_election_id, type_subtype, voter_id = nil)
46
+ Decidim::BulletinBoard::MessageIdentifier.format(unique_election_id, type_subtype, voter_id ? :voter : :authority, voter_id || authority_slug)
47
+ end
48
48
  end
49
49
  end
50
50
  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": {
@@ -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",
@@ -476,6 +494,91 @@
476
494
  "description": null,
477
495
  "args": [
478
496
 
497
+ ],
498
+ "type": {
499
+ "kind": "SCALAR",
500
+ "name": "String",
501
+ "ofType": null
502
+ },
503
+ "isDeprecated": false,
504
+ "deprecationReason": null
505
+ }
506
+ ],
507
+ "inputFields": null,
508
+ "interfaces": [
509
+ {
510
+ "kind": "INTERFACE",
511
+ "name": "MessageInterface",
512
+ "ofType": null
513
+ }
514
+ ],
515
+ "enumValues": null,
516
+ "possibleTypes": null
517
+ },
518
+ {
519
+ "kind": "INTERFACE",
520
+ "name": "MessageInterface",
521
+ "description": null,
522
+ "fields": [
523
+ {
524
+ "name": "client",
525
+ "description": null,
526
+ "args": [
527
+
528
+ ],
529
+ "type": {
530
+ "kind": "NON_NULL",
531
+ "name": null,
532
+ "ofType": {
533
+ "kind": "OBJECT",
534
+ "name": "Client",
535
+ "ofType": null
536
+ }
537
+ },
538
+ "isDeprecated": false,
539
+ "deprecationReason": null
540
+ },
541
+ {
542
+ "name": "election",
543
+ "description": null,
544
+ "args": [
545
+
546
+ ],
547
+ "type": {
548
+ "kind": "NON_NULL",
549
+ "name": null,
550
+ "ofType": {
551
+ "kind": "OBJECT",
552
+ "name": "Election",
553
+ "ofType": null
554
+ }
555
+ },
556
+ "isDeprecated": false,
557
+ "deprecationReason": null
558
+ },
559
+ {
560
+ "name": "id",
561
+ "description": null,
562
+ "args": [
563
+
564
+ ],
565
+ "type": {
566
+ "kind": "NON_NULL",
567
+ "name": null,
568
+ "ofType": {
569
+ "kind": "SCALAR",
570
+ "name": "ID",
571
+ "ofType": null
572
+ }
573
+ },
574
+ "isDeprecated": false,
575
+ "deprecationReason": null
576
+ },
577
+ {
578
+ "name": "messageId",
579
+ "description": null,
580
+ "args": [
581
+
479
582
  ],
480
583
  "type": {
481
584
  "kind": "NON_NULL",
@@ -488,14 +591,37 @@
488
591
  },
489
592
  "isDeprecated": false,
490
593
  "deprecationReason": null
594
+ },
595
+ {
596
+ "name": "signedData",
597
+ "description": null,
598
+ "args": [
599
+
600
+ ],
601
+ "type": {
602
+ "kind": "SCALAR",
603
+ "name": "String",
604
+ "ofType": null
605
+ },
606
+ "isDeprecated": false,
607
+ "deprecationReason": null
491
608
  }
492
609
  ],
493
610
  "inputFields": null,
494
- "interfaces": [
495
-
496
- ],
611
+ "interfaces": null,
497
612
  "enumValues": null,
498
- "possibleTypes": null
613
+ "possibleTypes": [
614
+ {
615
+ "kind": "OBJECT",
616
+ "name": "LogEntry",
617
+ "ofType": null
618
+ },
619
+ {
620
+ "kind": "OBJECT",
621
+ "name": "PendingMessage",
622
+ "ofType": null
623
+ }
624
+ ]
499
625
  },
500
626
  {
501
627
  "kind": "OBJECT",
@@ -503,7 +629,7 @@
503
629
  "description": null,
504
630
  "fields": [
505
631
  {
506
- "name": "closeBallotBox",
632
+ "name": "createElection",
507
633
  "description": null,
508
634
  "args": [
509
635
  {
@@ -537,14 +663,14 @@
537
663
  ],
538
664
  "type": {
539
665
  "kind": "OBJECT",
540
- "name": "CloseBallotBoxMutationPayload",
666
+ "name": "CreateElectionMutationPayload",
541
667
  "ofType": null
542
668
  },
543
669
  "isDeprecated": false,
544
670
  "deprecationReason": null
545
671
  },
546
672
  {
547
- "name": "createElection",
673
+ "name": "endVote",
548
674
  "description": null,
549
675
  "args": [
550
676
  {
@@ -578,14 +704,14 @@
578
704
  ],
579
705
  "type": {
580
706
  "kind": "OBJECT",
581
- "name": "CreateElectionMutationPayload",
707
+ "name": "EndVoteMutationPayload",
582
708
  "ofType": null
583
709
  },
584
710
  "isDeprecated": false,
585
711
  "deprecationReason": null
586
712
  },
587
713
  {
588
- "name": "openBallotBox",
714
+ "name": "processKeyCeremonyStep",
589
715
  "description": null,
590
716
  "args": [
591
717
  {
@@ -619,14 +745,14 @@
619
745
  ],
620
746
  "type": {
621
747
  "kind": "OBJECT",
622
- "name": "OpenBallotBoxMutationPayload",
748
+ "name": "ProcessKeyCeremonyStepMutationPayload",
623
749
  "ofType": null
624
750
  },
625
751
  "isDeprecated": false,
626
752
  "deprecationReason": null
627
753
  },
628
754
  {
629
- "name": "processKeyCeremonyStep",
755
+ "name": "processTallyStep",
630
756
  "description": null,
631
757
  "args": [
632
758
  {
@@ -660,14 +786,14 @@
660
786
  ],
661
787
  "type": {
662
788
  "kind": "OBJECT",
663
- "name": "ProcessKeyCeremonyStepMutationPayload",
789
+ "name": "ProcessTallyStepMutationPayload",
664
790
  "ofType": null
665
791
  },
666
792
  "isDeprecated": false,
667
793
  "deprecationReason": null
668
794
  },
669
795
  {
670
- "name": "vote",
796
+ "name": "publishResults",
671
797
  "description": null,
672
798
  "args": [
673
799
  {
@@ -701,53 +827,176 @@
701
827
  ],
702
828
  "type": {
703
829
  "kind": "OBJECT",
704
- "name": "VoteMutationPayload",
830
+ "name": "PublishResultsMutationPayload",
705
831
  "ofType": null
706
832
  },
707
833
  "isDeprecated": false,
708
834
  "deprecationReason": null
709
- }
710
- ],
711
- "inputFields": null,
712
- "interfaces": [
713
-
714
- ],
715
- "enumValues": null,
716
- "possibleTypes": null
717
- },
718
- {
719
- "kind": "OBJECT",
720
- "name": "OpenBallotBoxMutationPayload",
721
- "description": "Autogenerated return type of OpenBallotBoxMutation",
722
- "fields": [
835
+ },
723
836
  {
724
- "name": "election",
837
+ "name": "startKeyCeremony",
725
838
  "description": null,
726
839
  "args": [
727
-
840
+ {
841
+ "name": "messageId",
842
+ "description": null,
843
+ "type": {
844
+ "kind": "NON_NULL",
845
+ "name": null,
846
+ "ofType": {
847
+ "kind": "SCALAR",
848
+ "name": "String",
849
+ "ofType": null
850
+ }
851
+ },
852
+ "defaultValue": null
853
+ },
854
+ {
855
+ "name": "signedData",
856
+ "description": null,
857
+ "type": {
858
+ "kind": "NON_NULL",
859
+ "name": null,
860
+ "ofType": {
861
+ "kind": "SCALAR",
862
+ "name": "String",
863
+ "ofType": null
864
+ }
865
+ },
866
+ "defaultValue": null
867
+ }
728
868
  ],
729
869
  "type": {
730
870
  "kind": "OBJECT",
731
- "name": "Election",
871
+ "name": "StartKeyCeremonyMutationPayload",
732
872
  "ofType": null
733
873
  },
734
874
  "isDeprecated": false,
735
875
  "deprecationReason": null
736
876
  },
737
877
  {
738
- "name": "error",
878
+ "name": "startTally",
739
879
  "description": null,
740
880
  "args": [
741
-
742
- ],
743
- "type": {
744
- "kind": "SCALAR",
745
- "name": "String",
746
- "ofType": null
747
- },
748
- "isDeprecated": false,
749
- "deprecationReason": null
750
- }
881
+ {
882
+ "name": "messageId",
883
+ "description": null,
884
+ "type": {
885
+ "kind": "NON_NULL",
886
+ "name": null,
887
+ "ofType": {
888
+ "kind": "SCALAR",
889
+ "name": "String",
890
+ "ofType": null
891
+ }
892
+ },
893
+ "defaultValue": null
894
+ },
895
+ {
896
+ "name": "signedData",
897
+ "description": null,
898
+ "type": {
899
+ "kind": "NON_NULL",
900
+ "name": null,
901
+ "ofType": {
902
+ "kind": "SCALAR",
903
+ "name": "String",
904
+ "ofType": null
905
+ }
906
+ },
907
+ "defaultValue": null
908
+ }
909
+ ],
910
+ "type": {
911
+ "kind": "OBJECT",
912
+ "name": "StartTallyMutationPayload",
913
+ "ofType": null
914
+ },
915
+ "isDeprecated": false,
916
+ "deprecationReason": null
917
+ },
918
+ {
919
+ "name": "startVote",
920
+ "description": null,
921
+ "args": [
922
+ {
923
+ "name": "messageId",
924
+ "description": null,
925
+ "type": {
926
+ "kind": "NON_NULL",
927
+ "name": null,
928
+ "ofType": {
929
+ "kind": "SCALAR",
930
+ "name": "String",
931
+ "ofType": null
932
+ }
933
+ },
934
+ "defaultValue": null
935
+ },
936
+ {
937
+ "name": "signedData",
938
+ "description": null,
939
+ "type": {
940
+ "kind": "NON_NULL",
941
+ "name": null,
942
+ "ofType": {
943
+ "kind": "SCALAR",
944
+ "name": "String",
945
+ "ofType": null
946
+ }
947
+ },
948
+ "defaultValue": null
949
+ }
950
+ ],
951
+ "type": {
952
+ "kind": "OBJECT",
953
+ "name": "StartVoteMutationPayload",
954
+ "ofType": null
955
+ },
956
+ "isDeprecated": false,
957
+ "deprecationReason": null
958
+ },
959
+ {
960
+ "name": "vote",
961
+ "description": null,
962
+ "args": [
963
+ {
964
+ "name": "messageId",
965
+ "description": null,
966
+ "type": {
967
+ "kind": "NON_NULL",
968
+ "name": null,
969
+ "ofType": {
970
+ "kind": "SCALAR",
971
+ "name": "String",
972
+ "ofType": null
973
+ }
974
+ },
975
+ "defaultValue": null
976
+ },
977
+ {
978
+ "name": "signedData",
979
+ "description": null,
980
+ "type": {
981
+ "kind": "NON_NULL",
982
+ "name": null,
983
+ "ofType": {
984
+ "kind": "SCALAR",
985
+ "name": "String",
986
+ "ofType": null
987
+ }
988
+ },
989
+ "defaultValue": null
990
+ }
991
+ ],
992
+ "type": {
993
+ "kind": "OBJECT",
994
+ "name": "VoteMutationPayload",
995
+ "ofType": null
996
+ },
997
+ "isDeprecated": false,
998
+ "deprecationReason": null
999
+ }
751
1000
  ],
752
1001
  "inputFields": null,
753
1002
  "interfaces": [
@@ -786,9 +1035,13 @@
786
1035
 
787
1036
  ],
788
1037
  "type": {
789
- "kind": "OBJECT",
790
- "name": "Election",
791
- "ofType": null
1038
+ "kind": "NON_NULL",
1039
+ "name": null,
1040
+ "ofType": {
1041
+ "kind": "OBJECT",
1042
+ "name": "Election",
1043
+ "ofType": null
1044
+ }
792
1045
  },
793
1046
  "isDeprecated": false,
794
1047
  "deprecationReason": null
@@ -836,13 +1089,9 @@
836
1089
 
837
1090
  ],
838
1091
  "type": {
839
- "kind": "NON_NULL",
840
- "name": null,
841
- "ofType": {
842
- "kind": "SCALAR",
843
- "name": "String",
844
- "ofType": null
845
- }
1092
+ "kind": "SCALAR",
1093
+ "name": "String",
1094
+ "ofType": null
846
1095
  },
847
1096
  "isDeprecated": false,
848
1097
  "deprecationReason": null
@@ -868,7 +1117,11 @@
868
1117
  ],
869
1118
  "inputFields": null,
870
1119
  "interfaces": [
871
-
1120
+ {
1121
+ "kind": "INTERFACE",
1122
+ "name": "MessageInterface",
1123
+ "ofType": null
1124
+ }
872
1125
  ],
873
1126
  "enumValues": null,
874
1127
  "possibleTypes": null
@@ -914,6 +1167,88 @@
914
1167
  "enumValues": null,
915
1168
  "possibleTypes": null
916
1169
  },
1170
+ {
1171
+ "kind": "OBJECT",
1172
+ "name": "ProcessTallyStepMutationPayload",
1173
+ "description": "Autogenerated return type of ProcessTallyStepMutation",
1174
+ "fields": [
1175
+ {
1176
+ "name": "error",
1177
+ "description": null,
1178
+ "args": [
1179
+
1180
+ ],
1181
+ "type": {
1182
+ "kind": "SCALAR",
1183
+ "name": "String",
1184
+ "ofType": null
1185
+ },
1186
+ "isDeprecated": false,
1187
+ "deprecationReason": null
1188
+ },
1189
+ {
1190
+ "name": "pendingMessage",
1191
+ "description": null,
1192
+ "args": [
1193
+
1194
+ ],
1195
+ "type": {
1196
+ "kind": "OBJECT",
1197
+ "name": "PendingMessage",
1198
+ "ofType": null
1199
+ },
1200
+ "isDeprecated": false,
1201
+ "deprecationReason": null
1202
+ }
1203
+ ],
1204
+ "inputFields": null,
1205
+ "interfaces": [
1206
+
1207
+ ],
1208
+ "enumValues": null,
1209
+ "possibleTypes": null
1210
+ },
1211
+ {
1212
+ "kind": "OBJECT",
1213
+ "name": "PublishResultsMutationPayload",
1214
+ "description": "Autogenerated return type of PublishResultsMutation",
1215
+ "fields": [
1216
+ {
1217
+ "name": "election",
1218
+ "description": null,
1219
+ "args": [
1220
+
1221
+ ],
1222
+ "type": {
1223
+ "kind": "OBJECT",
1224
+ "name": "Election",
1225
+ "ofType": null
1226
+ },
1227
+ "isDeprecated": false,
1228
+ "deprecationReason": null
1229
+ },
1230
+ {
1231
+ "name": "error",
1232
+ "description": null,
1233
+ "args": [
1234
+
1235
+ ],
1236
+ "type": {
1237
+ "kind": "SCALAR",
1238
+ "name": "String",
1239
+ "ofType": null
1240
+ },
1241
+ "isDeprecated": false,
1242
+ "deprecationReason": null
1243
+ }
1244
+ ],
1245
+ "inputFields": null,
1246
+ "interfaces": [
1247
+
1248
+ ],
1249
+ "enumValues": null,
1250
+ "possibleTypes": null
1251
+ },
917
1252
  {
918
1253
  "kind": "OBJECT",
919
1254
  "name": "Query",
@@ -1065,13 +1400,19 @@
1065
1400
  "name": "id",
1066
1401
  "description": null,
1067
1402
  "type": {
1068
- "kind": "NON_NULL",
1069
- "name": null,
1070
- "ofType": {
1071
- "kind": "SCALAR",
1072
- "name": "ID",
1073
- "ofType": null
1074
- }
1403
+ "kind": "SCALAR",
1404
+ "name": "ID",
1405
+ "ofType": null
1406
+ },
1407
+ "defaultValue": null
1408
+ },
1409
+ {
1410
+ "name": "messageId",
1411
+ "description": null,
1412
+ "type": {
1413
+ "kind": "SCALAR",
1414
+ "name": "String",
1415
+ "ofType": null
1075
1416
  },
1076
1417
  "defaultValue": null
1077
1418
  }
@@ -1092,6 +1433,129 @@
1092
1433
  "enumValues": null,
1093
1434
  "possibleTypes": null
1094
1435
  },
1436
+ {
1437
+ "kind": "OBJECT",
1438
+ "name": "StartKeyCeremonyMutationPayload",
1439
+ "description": "Autogenerated return type of StartKeyCeremonyMutation",
1440
+ "fields": [
1441
+ {
1442
+ "name": "error",
1443
+ "description": null,
1444
+ "args": [
1445
+
1446
+ ],
1447
+ "type": {
1448
+ "kind": "SCALAR",
1449
+ "name": "String",
1450
+ "ofType": null
1451
+ },
1452
+ "isDeprecated": false,
1453
+ "deprecationReason": null
1454
+ },
1455
+ {
1456
+ "name": "pendingMessage",
1457
+ "description": null,
1458
+ "args": [
1459
+
1460
+ ],
1461
+ "type": {
1462
+ "kind": "OBJECT",
1463
+ "name": "PendingMessage",
1464
+ "ofType": null
1465
+ },
1466
+ "isDeprecated": false,
1467
+ "deprecationReason": null
1468
+ }
1469
+ ],
1470
+ "inputFields": null,
1471
+ "interfaces": [
1472
+
1473
+ ],
1474
+ "enumValues": null,
1475
+ "possibleTypes": null
1476
+ },
1477
+ {
1478
+ "kind": "OBJECT",
1479
+ "name": "StartTallyMutationPayload",
1480
+ "description": "Autogenerated return type of StartTallyMutation",
1481
+ "fields": [
1482
+ {
1483
+ "name": "error",
1484
+ "description": null,
1485
+ "args": [
1486
+
1487
+ ],
1488
+ "type": {
1489
+ "kind": "SCALAR",
1490
+ "name": "String",
1491
+ "ofType": null
1492
+ },
1493
+ "isDeprecated": false,
1494
+ "deprecationReason": null
1495
+ },
1496
+ {
1497
+ "name": "pendingMessage",
1498
+ "description": null,
1499
+ "args": [
1500
+
1501
+ ],
1502
+ "type": {
1503
+ "kind": "OBJECT",
1504
+ "name": "PendingMessage",
1505
+ "ofType": null
1506
+ },
1507
+ "isDeprecated": false,
1508
+ "deprecationReason": null
1509
+ }
1510
+ ],
1511
+ "inputFields": null,
1512
+ "interfaces": [
1513
+
1514
+ ],
1515
+ "enumValues": null,
1516
+ "possibleTypes": null
1517
+ },
1518
+ {
1519
+ "kind": "OBJECT",
1520
+ "name": "StartVoteMutationPayload",
1521
+ "description": "Autogenerated return type of StartVoteMutation",
1522
+ "fields": [
1523
+ {
1524
+ "name": "error",
1525
+ "description": null,
1526
+ "args": [
1527
+
1528
+ ],
1529
+ "type": {
1530
+ "kind": "SCALAR",
1531
+ "name": "String",
1532
+ "ofType": null
1533
+ },
1534
+ "isDeprecated": false,
1535
+ "deprecationReason": null
1536
+ },
1537
+ {
1538
+ "name": "pendingMessage",
1539
+ "description": null,
1540
+ "args": [
1541
+
1542
+ ],
1543
+ "type": {
1544
+ "kind": "OBJECT",
1545
+ "name": "PendingMessage",
1546
+ "ofType": null
1547
+ },
1548
+ "isDeprecated": false,
1549
+ "deprecationReason": null
1550
+ }
1551
+ ],
1552
+ "inputFields": null,
1553
+ "interfaces": [
1554
+
1555
+ ],
1556
+ "enumValues": null,
1557
+ "possibleTypes": null
1558
+ },
1095
1559
  {
1096
1560
  "kind": "SCALAR",
1097
1561
  "name": "String",