Record not found on query React JS

Hi! I’m trying to fetch a specific user from the database. but I get the following error: “Object not found”. My goal is to get a specific user based on input value. I’ve tried hardcoding the username as well but without any result. This is what I have so far:

function List()


const[username, setUsername] = useState('')

const {fetch,data, error, isLoading} = useMoralisQuery("User",q=>q.get('username') ===username)

const[wallet, setWallet] = useState('')



                <div className="list_box">

                 <div className="title_box p-3 d-flex justify-content-center">



                 <div className="search_box d-flex col p-3">

                    <input type="search" className="search_input row" placeholder="Search" onChange={(e)=>setUsername(}></input>

                    <div className="position-relative w-25" onClick={fetch}>

                   <img src={blobButton} className="svg_button position-absolute" alt="blob button"/>

                   <FontAwesomeIcon className="icon_message_writing" icon={faEdit} />





1 Like

Hi @HenryJones

Try this:

const { data, error, isLoading } = useMoralisQuery("User", user=>
  user.equalTo("username", username).limit(1),

Awesome, thank you! Can you send me a link with the documentation for the query functions? I can’t seem to find them anywhere.

Take a look at:
1 Like