OBJECT

Poll

A poll users can vote in.

link GraphQL Schema definition

1type Poll {
2
3# A choice specified by a choice id.
4choice(id: ID!): PollChoice
5
6# A list of choices users can vote for.
7choices: [PollChoice!]!
8
9# User that created the poll.
10# Mods and editors can make polls on behalf of a broadcaster.
11createdBy: User
12
13# Amount of seconds from when the poll starts to when it ends.
14# Since a broadcaster can end a poll early ("terminate a poll"), it may be
15# possible for endedAt - startedAt != duration.
16durationSeconds: Int!
17
18# Time when the poll ended.
19# Null if the poll is still active.
20endedAt: Time
21
22# User that ended the poll. Mods and editors can end polls on behalf of a
23# broadcaster.
24# Null if no user manually ended the poll.
25endedBy: User
26
27# ID of poll.
28id: ID!
29
30# Whether the poll is viewable by other users.
31isViewable: Boolean!
32
33# User who owns this poll. The poll will appear on their channel.
34ownedBy: User
35
36# Amount of milliseconds before the poll ends.
37# 0 when the polls is ended.
38remainingDurationMilliseconds: Int!
39
40# The authenticated user's relationship with this poll.
41# Main use case is to check if the user has voted in the poll already.
42# Null if un-authenticated user is making this query.
43self: PollSelfEdge
44
45# A map of poll settings.
46settings: PollSettings!
47
48# Time when poll started.
49startedAt: Time!
50
51# The status of the poll.
52status: PollStatus!
53
54# Title of poll.
55title: String!
56
57# A breakdown of the different tokens used in this poll.
58tokens: PollTokenBreakdown!
59
60# The top Bits contributor for the poll.
61topBitsContributor: PollTopBitsContributor
62
63# The top Community Points contributor for the poll.
64topCommunityPointsContributor: PollTopCommunityPointsContributor
65
66# The top Bits contributor for the poll.
67topContributor: PollTopContributor @deprecated( reason: "Use topBitsContributor instead." )
68
69# Total number of unique voters that have voted in this poll.
70totalVoters: Int!
71
72# A breakdown of the different votes cast in this poll.
73votes: PollVoteBreakdown!
74
75}