Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/interep-project/subgraph

Interep subgraph definition (The Graph).
https://github.com/interep-project/subgraph

api interrep subgraph thegraph

Last synced: 9 days ago
JSON representation

Interep subgraph definition (The Graph).

Awesome Lists containing this project

README

        



Interep subgraph


Interep subgraph definition (The Graph).






Linter eslint


Code style prettier

Repository top language




👥 Contributing

  |  

🤝 Code of conduct

  |  

🗣️ Chat & Support


___

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

| Kovan | Goerli | Arbitrum One |
| ------- | ----- | ------ |
| [interep-groups-kovan](https://thegraph.com/hosted-service/subgraph/interep-project/interep-groups-kovan) | [interep-groups-goerli](https://thegraph.com/hosted-service/subgraph/interep-project/interep-groups-goerli) | |

---

## Install

Clone this repository and install the dependencies:

```bash
$ 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:

```bash
yarn lint
```

### Network

Prepare your network:

```bash
yarn prepare:kovan
# or
yarn prepare:goerli
```

### Code generation

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

```bash
yarn codegen
```

### Authorization

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

```bash
yarn auth
```

### Deploy

Deploy the subgraph to the [hosted service](https://thegraph.com/docs/hostedservice/deploy-subgraph-hosted):

```bash
yarn deploy:kovan
// or
yarn deploy:goerli
```