Consuming authentication api with react query: useMutation

Hello devs, I am working on a tour project using react 18 and typescript. Mosh said if we are consuming server data we should use react query. I want consume a login and register authentication api but I do not know how to do it. I search youtube but I am not getting the help I need. If anyone could help me with the right resources I would be very grateful.