docs icon indicating copy to clipboard operation
docs copied to clipboard

refactor: use deployments package

Open PaulRBerg opened this issue 1 year ago • 5 comments

  • 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.

PaulRBerg avatar Apr 22 '25 14:04 PaulRBerg

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

PaulRBerg avatar Apr 28 '25 17:04 PaulRBerg

bun run check is going crazy.

Click to view recording

https://github.com/user-attachments/assets/3314266f-d0e3-474a-b733-fce521248efc

smol-ninja avatar Apr 30 '25 10:04 smol-ninja

Thanks for your kind feedback @smol-ninja

@andreivladbrg waiting for your review (no rush, just FYI)

PaulRBerg avatar May 01 '25 12:05 PaulRBerg

Flow deployments of Ultra and Tangle are missing in the new changes.

smol-ninja avatar May 04 '25 09:05 smol-ninja

Good catch, I corrected that: https://github.com/sablier-labs/deployments/commit/211bdadfcea5d7ec18f02c06096774220fbd33e9

The fix is to bump the package :D

PaulRBerg avatar May 04 '25 10:05 PaulRBerg

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.

PaulRBerg avatar Jun 16 '25 16:06 PaulRBerg

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

PaulRBerg avatar Jun 25 '25 19:06 PaulRBerg

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.

razgraf avatar Jul 15 '25 13:07 razgraf

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.

PaulRBerg avatar Jul 15 '25 13:07 PaulRBerg

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.

razgraf avatar Jul 15 '25 14:07 razgraf

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

PaulRBerg avatar Aug 21 '25 13:08 PaulRBerg

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?

razgraf avatar Aug 23 '25 11:08 razgraf

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.

PaulRBerg avatar Aug 25 '25 10:08 PaulRBerg