## Description
In certain scenarios, dApp needs to utilize useQueries for data
retrieval.
Here is an example:
```typescript
const { data: coinBalanceList = [] } = useSuiClientQuery("getAllBalances", {
owner: walletAddress,
});
// After obtaining the balance for each coin,
// it is necessary to further retrieve the metadata for each individual coin.
const [coinMetadataQuery, allBalanceQuery, ownedObjectsQuery] =
useSuiClientQueries(
{ method: "getCoinMetadata", params: { coinType: "exampleCoinType" } },
{
method: "getAllBalances",
params: { owner: "exampleOwnerAddress" },
options: {
queryKey: ["123"],
},
},
// error 'params' is declared here.
{ method: "getOwnedObjects" }
);
const CoinMetadata = coinMetadataQuery.data;
const allBalance = allBalanceQuery.data;
const ownedObjects = ownedObjectsQuery.data;
```
With the `useSuiClientQueries` hook, retrieving the aforementioned data
will be much more easy.
If there are any changes needed or if you have any suggestions, please
feel free to contact me at any time!
Thanks!
## Test Plan
- Existing tests
- CI
How did you test the new or updated feature?
---
If your changes are not user-facing and not a breaking change, you can
skip the following section. Otherwise, please indicate what changed, and
then add to the Release Notes section as highlighted during the release
process.
### Type of Change (Check all that apply)
- [ ] protocol change
- [ ] user-visible impact
- [ ] breaking change for a client SDKs
- [ ] breaking change for FNs (FN binary must upgrade)
- [ ] breaking change for validators or node operators (must upgrade
binaries)
- [ ] breaking change for on-chain data layout
- [ ] necessitate either a data wipe or data migration
### Release notes
---------
Co-authored-by: hayes-mysten <135670682+hayes-mysten@users.noreply.github.com>
Co-authored-by: William Robertson <williamrobertson@mystenlabs.com>