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

v4 useQuery generation fix #154

Open DennisDv24 opened 2 months ago

DennisDv24 commented 2 months ago

My front-end dev told me the useQuery generated code doesnt work with tanstack v4, as it should be of the form

useQuery({ queryKey: [...],  queryFn: () => {}, ...options })

instead of:

useQuery(queryKey, queryFn?, {...options})

It looks like my fix works for my use case, but i havent run any tests nor checked if this breaks any kind of compatibility or integration.