Hi
I am trying to use agent.query to query a canister from typescript front-end in react native. I could not find any example of how it should be. Any help is much appreciated.
This is what I am trying to achieve: call test method of a canister from front-end using Http call. Specifically instead of ??? in the code below, I am not sure what to put as a valid QueryFields.
const authClient = await AuthClient.create();
const identity = authClient.getIdentity();
const agent = new HttpAgent({
host: 'https://boundary.ic0.app/',
identity,
});
const canisterId = Principal.fromText('4k2wq-cqaaa-aaaab-qac7q-cai');
agent.query(canisterId, <????????>, identity, ).then((res)=>{
console.log(res);
})