Using the React bindings, is there a way to query the ledger with parameters other than the contract key?

useStreamQuery accepts a second argument, take a look at the type signature at https://docs.daml.com/app-dev/bindings-ts/daml-react/modules/defaultledgercontext.html#usequery. This is the query that will be sent to the JSON API. So you can use something like useStreamQuery(Profile.Profile, () => ({state: "yourstate", city: "yourcity"}), []) to filter down to contracts with state set to "yourstate" and city set to "yourcity".

2 Likes