Subgraph
The subgraph of the Gotchiverse
Introduction
This subgraph provides all the information you need for the gotchiverse: Events, Parcels, Gotchis, Installations, Tiles and more.
Watch out! The subgraph is a WIP and things might change over time. Please follow the #subgraphs channel at the Aavegotchi Discord if you integrate the subgraph into your dapp.
The endpoint is available here: https://api.thegraph.com/subgraphs/name/aavegotchi/gotchiverse-matic.
The Playground where you can try out queries can be found here.
Schema
The schema consists out of basically three different kinds of entities: Events, State and Stats. We have for each event emitted on chain a Event entitiy on the subgraph whichs logs all the data. Such as Transfer events, Mint Parcel events or EquipTile events. The State holds the latest state of the Parcels, Gotchis, Installations and Tiles. Finally the Stats hold information about the Gotchiverse, the user, the parcels and gotchis.
You can find at the Playground or in the github repo the entire Schema: https://github.com/aavegotchi/gotchiverse-subgraph/blob/main/schema.graphql
Examples
In this section we provide some example queries which should help you to get first ideas of what to fetch from the graph and how to do it. You can insert all events on the Playground and get the results. If you need help on how to integrate those queries in your app please take a look into the General Section.
Events
You can query the subgraph for almost every event happened on chain. From transfers, to equip / unequip of installations and tiles also to parcel access rights and more.
Gotchis and Parcels
We store a lot of information about the Parcles, but very less for Gotchis, because the core matic subgraph already maintains the gotchi information. We store for both entity types the last channeled alchemica attribute. For the parcels we also store the size, the coordinates, the alchemica boost and the equipped tiles and installations.
Installation Types and Tile Types
You can query all the possible Installation and Tiles types with their pre requisites and alchemica costs.
Stats
We store some stats for the entire gotchisverse, but also for users, parcel and gotchis.
Contribute
If you find bugs or have feature requests please create an issue in the github repository. If you want to hack something please just talk to us at the Aavegotchi Discord.
Last updated