【发布时间】:2022-07-01 15:15:53
【问题描述】:
我今天第一次检查 Moralis。看了一些教程并阅读了文档。目前,我正在尝试查询角色 (_Role),但我得到的只是一个空数组。
const { fetch: getStaffRole } = useMoralisQuery('_Role');
async function Check() {
const q = new Moralis.Query('_Role');
const r = await q.first();
console.log('w functions:', r); //returns undefined
const r2 = await getStaffRole();
console.log('w hooks:', r2); //returns Array []
}
Code snippet of the query, Stack doesn't allow me to directly upload the image here.
【问题讨论】:
标签: javascript reactjs next.js moralis