t-convex-nextjs-saas/convex/hello.ts

10 lines
263 B
TypeScript

import { v } from "convex/values";
import { query } from "./_generated/server";
export const hello = query({
args: { name: v.optional(v.string()) },
returns: v.string(),
handler: async (ctx, args) => {
return `Hello ${args.name ?? "world"}!`;
},
});