0.93.4 • Published 11 months ago

@synthql/handler-next v0.93.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

@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

9 months ago

0.107.4

9 months ago

0.108.4

9 months ago

0.106.4

9 months ago

0.105.4

9 months ago

0.104.4

10 months ago

0.99.4

10 months ago

0.95.4

10 months ago

0.96.4

10 months ago

0.97.4

10 months ago

0.98.4

10 months ago

0.103.4

10 months ago

0.100.4

10 months ago

0.101.4

10 months ago

0.102.4

10 months ago

0.94.4

10 months ago

0.93.4

11 months ago

0.92.4

11 months ago

0.91.4

11 months ago

0.90.4

11 months ago

0.89.4

11 months ago

0.88.4

11 months ago

0.87.4

11 months ago

0.86.4

11 months ago

0.85.4

11 months ago

0.84.4

11 months ago

0.83.4

11 months ago

0.82.4

11 months ago

0.81.4

11 months ago