// remove everything related to any of these contracts
queryClient.removeQueries([{ contract: 'cw3FlexMultisig' }])
queryClient.removeQueries(cw3FlexMultisigQueryKeys.contract)
// reset all the queries for this specific contract address
queryClient.resetQueries([{ contract: 'cw3FlexMultisig', address: 'juno1ua2ak7ucrjc5vfzlzeyaw9shrpr2srqggquanqmztfv2fzqvyfhsu2pnzj' }])
queryClient.resetQueries(cw3FlexMultisigQueryKeys.address('juno...u2pnzj'))
// invalidate all queries for this specific query method
queryClient.invalidateQueries([{ contract: 'cw3FlexMultisig' , address: 'juno1ua2...hsu2pnzj', method: 'list_voters'
}}])
queryClient.invalidateQueries(cw3FlexMultisigQueryKeys.listVoters('juno1....u2pnzj'))
This PR allows the user to specify
queryKeys
option for the react-query generation so that the following (truncated) will be generated:Please see https://tkdodo.eu/blog/effective-react-query-keys
This allows the following:
(https://tanstack.com/query/v4/docs/reference/QueryClient#queryclientsetquerydata) AND allows for use of setting query data if fetched outside of react query, so that fewer network calls have to be duplicated:
Note that it is updated for the
optionalClient
to accept anundefined
contract address :2Also note that it removes the strongly typed
(string | undefined)[])
and leaves it to inference.`