subsquid / squid-sdk

The main repo of the squid SDK
GNU General Public License v3.0
1.21k stars 147 forks source link

Experimental decorators: don't use them? #251

Open mlenser opened 7 months ago

mlenser commented 7 months ago

Experimental decorators have presented problems throughout our usage of subsquid. I can't remember all of the instances, but many common solutions don't work with them and making decorators work has been a huge pain for our team. One example: today we were considering building our indexer with esbuild to avoid cjs/esm issues, but esbuild doesn't work well with decorators. It may be possible to make them work like we've done in a handful of other cases, but it's a huge drag.

Has there been any discussion about not using experimental decorators?

eldargab commented 6 months ago

SDK itself doesn't provide any decorator in its public API.

All decorators present in mapping projects come from peer dependencies - typeorm and type-graphql.

We can do nothing until those projects migrate or we'll provide viable alternatives.