Skip to main content

Definition

The TributeDAO framework harnesses the power of The Graph definition, which enables the Tribute UI to take advantage of the capabilities of a subgraph API.

The TributeDAO subgraph utilizes the GraphGL API and AssemblyScript API to write subgraph mappings that is used for the Graph Protocol. Details on the workings of these APIs and The Graph Protocol are beyond the scope of what is covered in this documentation, check out the following links to further details on these APIs:

  • The Graph Protocol: explain everything you need to know in order to use The Graph Protocol.
  • GraphQL API: explains the GraphQL Query API that is used for the Graph Protocol
  • AssemblyScript API: documents what built-in APIs can be used when writing subgraph mappings.

Each subgraph definition directory consists of the following files:

  • subgraph.yaml: a YAML file containing the datasources and templates used for the subgraph manifest
  • schema.graphql: a GraphQL schema containing the entities and fields of the data that is stored for the subgraph, and how to query it via GraphQL
  • AssemblyScript Mappings: AssemblyScript code that translates from the event data in Ethereum to the entities defined in the schema.graphql (e.g. mapping.ts)