For Enterprise customers, we offer a read-only user to your subgraph's underlying Postgres database.
- Powering complex SQL aggregations that are difficult with GraphQL.
- Powering internal analytics or dashboards.
Every subgraph maps to a Postgres DB schema, and every entity in your subgraph maps to a table in that schema.
Each table row represents a state of a subgraph entity for a specific block range. Any time that your subgraph changes, the subgraph captures a new row.
Every row will have the following columns:
This allows you to answer complex time-series queries with your subgraph entities. For example:
- You can track how the TVL for a Pool increases over time.
- You can track total protocol users over time.