A more in-depth look at how Hydra works under the hood
A Hydra query node consists of the following core parts:
  • Blockchain Indexer
  • PostgreSQL (Data Storage)
  • GraphQL Server
  • GraphQL-like data schema & event mappings
Hydra takes as an input a high-level GraphQL-like schema modeling the blockchain data ("entities") to be indexed. The mappings describe the event handlers telling the indexer how the blockchain events affect the schema entities.
Once the schema and the mappings are set up, the Indexer prepares the database and starts the continuous scan of the blockchain, processing the events through the mappings and updating the entities in the database.
The GraphQL Server is a separate web server providing a GraphQL API for the entities in the data store. The API requests are resolved by the server into database queries, providing quick access to the most recent state of the entities. OpenCRUD filtering, entity relations, pagination, and text queries are supported out-of-the-box by the API.
Last modified 7mo ago
Copy link