Skip to content

interep-project/subgraph

Repository files navigation

Interep subgraph

Interep subgraph definition (The Graph).

Linter eslint Code style prettier Repository top language


The Interep subgraph allows on-chain Merkle trees to be queried using GraphQL.

Kovan Goerli Arbitrum One
interep-groups-kovan interep-groups-goerli

Install

Clone this repository and install the dependencies:

$ git clone https://github.com/interep-project/subgraph.git
$ cd subgraph
$ yarn # or `npm i`

Usage

The subgraph definition consists of a few files:

  • subgraph.yaml: a YAML file containing the subgraph manifest,
  • schema.graphql: a GraphQL schema that defines what data is stored for the subgraph, and how to query it via GraphQL,
  • src/mappings.ts: AssemblyScript code that translates from the event data to the entities defined in the schema.

Lint

Lint the src AssemblyScript code:

yarn lint

Network

Prepare your network:

yarn prepare:kovan
# or
yarn prepare:goerli

Code generation

Generate AssemblyScript types for the subgraph (required every time the schema changes):

yarn codegen

Authorization

Set the authorisation code that links your account on thegraph.com:

yarn auth <access-token>

Deploy

Deploy the subgraph to the hosted service:

yarn deploy:kovan
// or
yarn deploy:goerli

Releases

No releases published