Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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).
- Host: GitHub
- URL: https://github.com/interep-project/subgraph
- Owner: interep-project
- License: mit
- Created: 2021-10-13T09:07:20.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-27T10:36:08.000Z (over 1 year ago)
- Last Synced: 2023-03-06T18:26:35.345Z (over 1 year ago)
- Topics: api, interrep, subgraph, thegraph
- Language: TypeScript
- Homepage:
- Size: 200 KB
- Stars: 5
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Interep subgraph
Interep subgraph definition (The Graph).
___
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
```