Simultaneously Run a query

At first glance, there are a couple of things wrong:

  1. you do not need to declare the function async if you are not using await. Delete it
  2. the returned result of a query is an object, with , amongst others, 1 key called “items”, which holds an array of rows. That’s the “real” data. So you should test for result.items.length.
  3. you could have easily found this out yourself if you just put in a console.log or console.info here and there. That’s what they are made for: debugging.

Happy hunting