Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Comercial
    • Calculadora

0

87
Vistas
How to query Moralis roles with React?

I’m checking out Moralis for the first time today. Saw a few of the tutorials and read the documentation. Currently, I’m trying to query the Roles (_Role) but all I get is an empty array.

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.

—> Table permissions, table, & console logs

7 months ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos