Skip to content

Use SDK and indexers package #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 12 commits into
base: main
Choose a base branch
from
Open

Conversation

PaulRBerg
Copy link
Member

@PaulRBerg PaulRBerg commented Apr 22, 2025

Explainer

This PR significantly reduces the maintenance cost of the documentation site by auto-generating:

In addition, this PR has also made a few other improvements, such as integrating BiomeJS and polishing the ESLint config (using ESLint v9 now).

Issues Closed

@PaulRBerg
Copy link
Member Author

The PR is now ready for your review @sablier-labs/evm

@smol-ninja
Copy link
Member

smol-ninja commented Apr 30, 2025

bun run check is going crazy.

Click to view recording
Screen.Recording.2025-04-30.at.11.26.41.mov

Copy link
Member

@smol-ninja smol-ninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Phenomenal work @PaulRBerg.

9sfljx

@PaulRBerg
Copy link
Member Author

PaulRBerg commented Jun 16, 2025

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.

refactor: run prettier after autogen graphql
refactor: update autogen graphql docs
@PaulRBerg PaulRBerg changed the title refactor: use deployments package Use SDK and indexers package Jun 23, 2025
@smol-ninja smol-ninja force-pushed the refactor/deployments-package branch from 4d69bbd to be29596 Compare June 23, 2025 10:13
Copy link
Member

@smol-ninja smol-ninja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just had a second look and looks good to me now. Just pushed a new commit to fix some warnings and other minor errors.

@PaulRBerg
Copy link
Member Author

Received a question from a user (SYNTHR) for which the docs in this PR would have been helpful:

SCR-20250625-tdkm

Specifically, the new section about "Choosing Your Approach":

SCR-20250625-tduz

@razgraf
Copy link
Member

razgraf commented Jul 15, 2025

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.

@PaulRBerg
Copy link
Member Author

PaulRBerg commented Jul 15, 2025

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.

@razgraf
Copy link
Member

razgraf commented Jul 15, 2025

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment