[SOLVED] Get data by Pointer

I can’t figure out how to query data by pointer.
For example I have an Offer
so Object Offer has Account, Description, array Ids, and Pointer to user object.

How I can build useMoralisQuery to get all Offers by UserId(Pointer)

Hi Akira, as usual - I asked myself, I answered myself
The solution I was looking for is -
const { fetch } = useMoralisQuery(
“TABLENAME”,
(query) =>
query
.equalTo(“userId”, {
__type: “Pointer”,
className: “_User”,
objectId: “UserIdFromUserTable”,
})
.select(“Account”, “Description”, “Ids”),
[],
{ autoFetch: false },
);

Correct me if I am wrong, but it looks good for me.

2 Likes