Skip to content

feat(hub): add vp_value query to get total vp value#2194

Open
wa0x6e wants to merge 1 commit into
masterfrom
feat/hub-vp-value-query
Open

feat(hub): add vp_value query to get total vp value#2194
wa0x6e wants to merge 1 commit into
masterfrom
feat/hub-vp-value-query

Conversation

@wa0x6e

@wa0x6e wa0x6e commented Jun 27, 2026

Copy link
Copy Markdown
Contributor

Adds a vp_value query to the hub GraphQL API returning a voter's total monetary voting-power value, broken down by space.

Port of snapshot-labs/snapshot-hub#1066 to the monorepo's apps/hub.

Changes

  • New resolver apps/hub/src/graphql/operations/vpValue.ts (sums votes.vp_value per space for a voter)
  • Registered as vp_value in operations/index.ts
  • Schema: vp_value(voter: String!): VpValue query + VpValue / VpValueSpace types
  • schema.sql: add vp_value column to votes, set scores_total_value to DECIMAL(13,3)

Test plan

query {
  vp_value(voter: "0x...") {
    user
    totalVpValue
    spaces { id totalVpValue }
  }
}

Port of snapshot-labs/snapshot-hub#1066. Adds a vp_value query returning
a voter's total monetary voting-power value, broken down by space, plus the
vp_value column on votes and matching scores_total_value precision.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant