Waddler <> Gel
This guide assumes familiarity with:
- Database connection basics with Waddler
- gel-js basics
Waddler has native support for Gel connections with the gel-js
client.
Step 1 - Install packages
npm
yarn
pnpm
bun
npm i waddler gel
Step 2 - Initialize the driver and make a query
gel
gel with config
// Make sure to install the 'gel' package
import { waddler } from 'waddler/gel';
const sql = waddler(process.env.DATABASE_URL);
const result = await sql`select 1;`;
If you need to provide your existing driver:
// Make sure to install the 'gel' package
import { waddler } from "waddler/gel";
import { createClient } from "gel";
const gelClient = createClient();
const sql = waddler({ client: gelClient });
const result = await sql`select 1;`;