Bonfire.Poll.API.GraphQLMasto.Adapter (Bonfire v1.0.1-social-alpha.28)
View SourceMastodon-compatible Poll API endpoints.
Handles viewing polls and voting on them. Uses direct domain calls
to the well-established context functions in Bonfire.Poll.
Summary
Functions
GET /api/v1/polls/:id
Returns a poll by ID. Public if parent status is public, requires authentication for private polls.
POST /api/v1/polls/:id/votes
Vote on a poll. Requires authentication. The choices[] parameter
contains 0-based indices of the choices to vote for.
Returns 422 if:
- Poll has expired
- User has already voted
- Invalid choice indices