Hi! I've been having an issue where I am trying to...
# orm-help
a
Hi! I've been having an issue where I am trying to query all of something. Let's say users. such as:
Copy code
export const userQueries = {
    async fetchUsers(_, {}, ctx) {
        console.log(await ctx.db.users())
        return ctx.db.users();
    }
};
but on playground it tells me:
"message": "Cannot return null for non-nullable field User.firstName.",
However, that
console.log
I have there does log out the object. Is there something I'm missing?
h
info object
a
I wasn't formatting my return type correctly lol
@huv1k thanks for your reply 🙂 , I was looking into the info object, how would I return it in this case?
h
return ctx.db.users({}, info)
a
nice thanks!