@daostack/client › Globals › Vote
- Vote
+ new Vote(idOrOpts
: string | IVoteStaticState, context
: Arc): Vote
Defined in vote.ts:155
Parameters:
Name | Type |
---|---|
idOrOpts |
string | IVoteStaticState |
context |
Arc |
Returns: Vote
• context: Arc
Defined in vote.ts:157
• id: string | undefined
Defined in vote.ts:154
• staticState: IVoteStaticState | undefined
Defined in vote.ts:155
▸ fetchStaticState(): Promise‹IVoteStaticState›
Defined in vote.ts:197
Returns: Promise‹IVoteStaticState›
▸ setStaticState(opts
: IVoteStaticState): void
Defined in vote.ts:193
Parameters:
Name | Type |
---|---|
opts |
IVoteStaticState |
Returns: void
▸ state(apolloQueryOptions
: IApolloQueryOptions): Observable‹IVoteState›
Defined in vote.ts:167
Parameters:
Name | Type | Default |
---|---|---|
apolloQueryOptions |
IApolloQueryOptions | {} |
Returns: Observable‹IVoteState›
▸ search(context
: Arc, options
: IVoteQueryOptions, apolloQueryOptions
: IApolloQueryOptions): Observable‹Vote[]›
Defined in vote.ts:58
Vote.search(context, options) searches for vote entities
Parameters:
Name | Type | Default | Description |
---|---|---|---|
context |
Arc | - | an Arc instance that provides connection information |
options |
IVoteQueryOptions | {} | the query options, cf. IVoteQueryOptions |
apolloQueryOptions |
IApolloQueryOptions | {} | - |
Returns: Observable‹Vote[]›
an observable of Vote objects
Defined in vote.ts:36
• VoteFields: any = gqlfragment VoteFields on ProposalVote { id createdAt dao { id } voter proposal { id } outcome reputation }
Defined in vote.ts:37