i'm in hardhat i'v this public mapping
mapping (address user => uint[] commentIds) public userComments;
and i'm trying to call it inside my test Script
console.log(`user1 comments: ${await postContract.userComments(user1.address)}`);
i get this error Error: no matching fragment (operation="fragment", info={ "args": [ "0x70997970C51812dc3A010C7d01b50e0d17dc79C8" ], "key": "userComments" }, code=UNSUPPORTED_OPERATION, version=6.8.0)
**i can access to the mapping by create a getter function but why is that isn't that public modifier already do that under the hood **