Query Convex data from Next.js route.ts endpoint
Can I query data from Convex db in next.js
route.ts
endpoint?
app/api/endpoint/route.ts
3 Replies
Just like in a server component, fetchQuery() is good for this https://docs.convex.dev/client/react/nextjs/server-rendering#using-convex-to-render-server-components
Or using the HTTP client https://docs.convex.dev/client/javascript/node
Node.js | Convex Developer Hub
Convex supports point-in-time queries (see
Thank you @ballingt!