CosmWasm / ts-codegen

Convert your CosmWasm smart contracts into dev-friendly TypeScript classes so you can focus on shipping code.
https://cosmology.zone/products/ts-codegen
Apache License 2.0
116 stars 28 forks source link

[feature request] Add Tanstack-Query v5 Support #135

Open MbBrainz opened 8 months ago

MbBrainz commented 8 months ago

Tanstack query has had a major version upgrade from v4 to v5 and there are some interesting benefits of having v5.

The migration guide to migrate from v4 to v5 can be found here: migrating-to-v5

I'd love to add the feature myself, but i dont have any experience with typescript code generation. The changes itself shouldnt be too hard and if someone wants to implement it or give me a little hint or example on where to start, then please!

MbBrainz commented 8 months ago

Big libraries in EVM client world have also adopted the Tanstack-Query@v5 for a few months now: https://wagmi.sh/react/guides/migrate-from-v1-to-v2 https://github.com/wevm/wagmi/releases/tag/%40wagmi%2Fcore%402.0.1

pyramation commented 7 months ago

Thanks! We've put it on our backlog :) will take a look w team asap!

MbBrainz commented 7 months ago

Im happy to implement and pr, just dont know where to start

CyberHoward commented 7 months ago

Would be amazing!

Kayanski commented 7 months ago

This is much needed !

clydedevv commented 7 months ago

TanStack Query v5 has been looking 👌 would be cool

pyramation commented 7 months ago

hey @MbBrainz you can help by giving me a template/sketch of the changes, see our fixture here

https://github.com/CosmWasm/ts-codegen/blob/main/__output__/sg721/Sg721.react-query.ts

I'm also thinking we should rename the feature/option from react-query to tanstack #143

MbBrainz commented 7 months ago

@pyramation I made the necessary changes to sg721.react-query.ts to be compatible with tanstack/react-query@5.x in this pull request. I installed that dep locally and checked the types. This should be completely functional.

In case anything is not clear, the migration guide migrating-to-v5 is very helpful.

MbBrainz commented 7 months ago

@pyramation checkout my template sketch

apollo-sturdy commented 2 months ago

Any update on this?