On Frontend, You will need to specify authMode.
import { generateClient } from "aws-amplify/api";
import type { Schema } from "~/amplify/data/resource";
const client = generateClient<Schema>();
const response = await client.queries.sendEmail({
name: "Amplify",
},{
authMode: "userPool"
});