0.109.4 • Published 7 months ago
@synthql/handler-next v0.109.4
@synthql/handler-next
SynthQL-compatible route handler function for use in Next.js App Router.
// src/queryEngine.ts
import { QueryEngine } from '@synthql/backend';
export const queryEngine = new QueryEngine({
url: 'postgresql://user:password@localhost:5432/dbname',
});
// src/app/[...synthql]/route.ts
import { createNextSynthqlHandler } from '@synthql/handler-next';
import { queryEngine } from '../../../queryEngine';
const nextSynthqlRequestHandler = createNextSynthqlHandler(queryEngine);
export async function POST(request: Request) {
return nextSynthqlRequestHandler(request);
}
Links
0.109.4
7 months ago
0.107.4
8 months ago
0.108.4
8 months ago
0.106.4
8 months ago
0.105.4
8 months ago
0.104.4
8 months ago
0.99.4
9 months ago
0.95.4
9 months ago
0.96.4
9 months ago
0.97.4
9 months ago
0.98.4
9 months ago
0.103.4
8 months ago
0.100.4
9 months ago
0.101.4
9 months ago
0.102.4
9 months ago
0.94.4
9 months ago
0.93.4
9 months ago
0.92.4
9 months ago
0.91.4
9 months ago
0.90.4
10 months ago
0.89.4
10 months ago
0.88.4
10 months ago
0.87.4
10 months ago
0.86.4
10 months ago
0.85.4
10 months ago
0.84.4
10 months ago
0.83.4
10 months ago
0.82.4
10 months ago
0.81.4
10 months ago