Skip to content

Backend to pull data from Subgraphs and serve it to dApps

Notifications You must be signed in to change notification settings

groLabs/gro-subgraph-be

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subgraph bot

TheGraph's hosted service was capable of providing data through API requests without requiring any keys, allowing any front-end to retrieve data directly from subgraphs without necessitating a back-end.

However, this hosted service is set to be phased out in 2023, and only subgraphs published on their decentralized network will have the capability to serve data through a paid API key. Consequently, having a back-end will be essential to securely manage the API key and serve data to our front-end from Gro's subgraphs.

A new Node.js bot, fully developed in TypeScript, has been implemented to facilitate this data flow, with the following configuration:

Host

msb2

Port

3015

Gateway

https://fxcnkxnki8.execute-api.eu-west-2.amazonaws.com/subgraph/gro_personal_position_mc?address=0x…&subgraph=prod_hosted

Host folder

~/gro/subgraph/

Start command

pm2 start npm --name "gro-subgraph" -- run "start:prod"

Repository

https://github.com/groLabs/gro-subgraph-be