Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fetch council motions from squid #264

Open
ishrak-imam opened this issue Aug 5, 2022 · 0 comments
Open

Fetch council motions from squid #264

ishrak-imam opened this issue Aug 5, 2022 · 0 comments
Assignees
Labels
Migrated to Asana Items that are already in Asana rn app

Comments

@ishrak-imam
Copy link

ishrak-imam commented Aug 5, 2022

Since we have started to display the past proposals in the app the resolver for the council motions needs to be updated to fetch data from the squid. The resolver should also handle pagination.

If any additional formatting is needed over the squid data such as, returning the full substrate account information, relative time from a block number, human readable formatting of balance data from chain etc. should also be done in the custom resolvers of the graph.

For reference this #262 is the PR where we did the same for democracy proposals.

For now we are not adding the on chain call information of the proposals (will be included when added in squid). For that and also in general we may need to update the typedefs for council in the graph too. For reference the above mentioned PR can also be checked.

Following is a sample query from squid that we will be executing in the graph and proxy the data to a client that is using the graph.

  substrateCouncilProposals(limit: 2, where: {network_eq: polkadot}, orderBy: date_DESC) {
    ayeCount
    blockNumber
    date
    id
    lastUpdate
    method
    nayCount
    network
    pallet
    proposalHash
    proposalId
    proposalIndex
    status
    threshold
    account {
      id
    }
    votes {
      approve
      blockNumber
      date
      id
      account {
        id
      }
    }
  }
}

We will need some extra information from squid to fully support the app based on currently displayed information and there is a ticket litentry/squid#127 for that extra data in the squid repository.

@luisjborges luisjborges added the Migrated to Asana Items that are already in Asana label Aug 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Migrated to Asana Items that are already in Asana rn app
Projects
None yet
Development

No branches or pull requests

3 participants