Query .equalTo().first() Doesn`t works Ts React

I’m working with react typescript, trying to get the last value of my query with an orderDescending and first, but I can only put one condition on the query… otherwise it throws me an error, “The expected type comes from the return type of this signature”. The following code (Taken from the official documentation) also gives me an error until I remove the .first

const { fetch } = useMoralisQuery(


          (query) =>

            query.equalTo("ownerEmail", "[email protected]").first(),


          { autoFetch: false }


Waiting for answers

You got the error due to the way the useMoralisQuery works. But a quick way around that is to make your query in such way

(query) => query.equalTo("ownerEmail", "[email protected]").descending().limit(1)