A GraphQL API to query the Centrifuge Parachain on Polkadot.
Use GraphQL query endpoint at https://api.subquery.network/sq/embrio-tech/centrifuge-subql or try the API with the SubQuery Playground.
We highly recommend to develop using the overarching centrifuge-development repository. It allows to run all required services and databases with Docker Compose.
.nvmrc
To generate the entities based on schema.graphql
, run:
yarn codegen
Open your browser and head to http://localhost:3000
.
Finally, you should see a GraphQL playground is showing in the explorer and the schemas that are ready to query.
Staged code is linted automatically with a pre-commit
hook.
You can run the linter with
yarn lint
To fix fixable lint errors use
yarn lint:fix
This repository uses commitlint to enforce commit message conventions. You have to specify the type of the commit in your commit message. Use one of the supported types.
git commit -m "[type]: foo bar"
!!! Data fields ending with an underscore _
are automatically reset at the end of a period and bust be of type BigInt
!!!
erDiagram
Account ||--o{ TrancheBalance: ""
Account ||--o{ CurrencyBalance: ""
Loan ||--|| LoanState: ""
Loan ||--o{ LoanSnapshot: ""
LoanState ||..|| LoanSnapshot: "onNewPeriod"
Pool ||--|| PoolState: ""
Pool ||--o{ PoolSnapshot: ""
PoolState ||..|| PoolSnapshot: "onNewPeriod"
Tranche }o--|| Pool: ""
Tranche ||--|| TrancheState: ""
Tranche ||--o{ TrancheSnapshot: ""
TrancheState ||..|| TrancheSnapshot: "onNewPeriod"
Epoch }|--|| Pool: ""
Epoch }o--|| EpochState: ""
EpochState ||--|| Tranche: ""
InvestorTransaction }o--|| Account: ""
InvestorTransaction ||--|| Pool: ""
InvestorTransaction ||--|| Tranche: ""
InvestorTransaction ||--|| Epoch: ""
OutstandingOrder }o--|| Account: ""
OutstandingOrder ||--|| Pool: ""
OutstandingOrder ||--|| Tranche: ""
OutstandingOrder ||--|| Epoch: ""
BorrowerTransaction }o--|| Account: ""
BorrowerTransaction ||--|| Epoch: ""
BorrowerTransaction ||--|| Loan: ""
Currency ||--|{ Pool: ""