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

11 lines
263 B
TypeScript
Raw Normal View History

2026-03-26 23:14:51 +00:00
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"}!`;
},
});