To integrate the Sablier V2 indexers into your own product, start from the official
We recommend using:
- GraphQL Code Generator to create types from your GraphQL fragments and queries
- TanStack Query to fetch results from the exposed endpoints.
If you're integrated the Sablier V2 subgraphs, we recommend using request and response wrappers/middleware to format results coming from Envio's indexer in the same shape as those from The Graph. Suggestions:
- Write queries in both systems (based on the
querying language specifics) using the same
operationNameand swap query strings between vendors based on it
- Write response middleware that converts results into similar shapes (see these important notes)
To contribute to the V2 indexers (Envio x Sablier) or deploy your own, head over to the GitHub
v2-subgraphs repository. Get started by reviewing the
To bootstrap an indexer project, run the following commands. They will install the requisite dependencies and generate the code for a multi-chain deployment.
pnpm run setup
You'll find a local Hasura process at
http://localhost:8080 which also includes a
GraphQL endpoint to query locally.
To deploy without hosting yourself, have a look at the Envio
Hosted Service docs.
Prior to starting the
Envio process (
pnpm dev) please make sure your Docker app is running. For installation see the
official docs at https://docs.envio.dev/.