refactor: use deployments package
- Closes #300
- Closes #301
- Closes #305
- Closes #311
Left to do:
- [x] Load subgraph data from the deployments package
- [x] ~~Load Legacy data from the deployments package~~ edit: it's actually alright to hard-code the Legacy contract addresses. We will never ship any new updates.
The PR is now ready for your review @sablier-labs/evm
bun run check is going crazy.
Click to view recording
https://github.com/user-attachments/assets/3314266f-d0e3-474a-b733-fce521248efc
Thanks for your kind feedback @smol-ninja
@andreivladbrg waiting for your review (no rush, just FYI)
Flow deployments of Ultra and Tangle are missing in the new changes.
Good catch, I corrected that: https://github.com/sablier-labs/deployments/commit/211bdadfcea5d7ec18f02c06096774220fbd33e9
The fix is to bump the package :D
The PR is finally ready for review!!
Not urgent but maybe we can get it done before EthCC — so that we can document the new AVCA product that will be released before or after EthCC.
A review from @smol-ninja and either @razgraf or @gavriliumircea would be helpful (for the Indexers part).
Note: it's a large diff so it's easier to review this by checking out the PR locally and browsing through the new codegens. The areas of interest are:
-
cli -
src/autogen/** -
**/graphql/the-graph/** -
**/graphql/envio/**
N.B. you may need to install the latest pre-requisities - check out the install-globals.sh script and the CONTRIBUTING.md file.
Received a question from a user (SYNTHR) for which the docs in this PR would have been helpful:
Specifically, the new section about "Choosing Your Approach":
This new version auto-generates queries in the API section.
The idea behind the Queries page under Indexers was to provide popular queries stemming from user requests over time. It was a good place to point to for copy-paste examples.
As a general feedback for these auto-generate queries and descriptions: since they can already be found in the indexer's page, in the schema, in the Hasura (or similar explorer) section describing the endpoint, I don't see a point in duplicating them yet again in our docs. They don't provide extra value and they increase maintanance cost since we'll have to remember re-generating if/when we update our endpoints.
I'd propose replacing them with the old custom queries and maybe adding a note about being able to find all filters and field descriptions using Hasura, if there's no human input necessary.
We can add some default queries, too. But let's please do that after we merge the PR because it's been open for a long time. And let's only add a handful - getting some streams and some campaigns, and that's it.
Also, the Indexers repo provides some default queries now (though they use the $where argument):
https://github.com/sablier-labs/indexers/blob/2e6ed1df82002c1c7141e6eae9e33dbb6c53c363/src/exports/queries/common/streams/graph.ts
I don't see a point in duplicating them yet again in our docs
- It's a much better UX to have the GraphQL docs in the same site where all other Sablier docs are located.
- Readers of the website may be too lazy to open Hasura, or may not like the context-switch.
- Keeping the docs on this site would also make them LLM friendly, and it would enable the Chef AI to provide better answers.
they increase maintanance cost since we'll have to remember re-generating if/when we update our endpoints.
The maintenance cost is super low now, because everything is automated. Bumping the @sablier/indexers package will auto-update the docs.
And let's only add a handful
The current docs contain the most requested ones e.g. streams from a campaign, campaigns with an asset, recipients who claimed etc. They can be probably be copy-pasted.
TODOs left here:
- [x] Hide the "Query Syntax" page (will be replaced by #346 in a separate PR)
- [x] Update the GraphQL schema import URLs
Reply for https://github.com/sablier-labs/docs/issues/349#issuecomment-3216540283
LGTM. I think we can merge. We don't mention anywhere that the schema (and ids) has undergone changes in August 2025, should we add that somewhere?
I don't think it would be worth mentioning that here in the docs as per the explanation given here.
There are other priorities at Sablier.