Skip to content

Commit f23d1ca

Browse files
committed
Example updates
1 parent 85c667e commit f23d1ca

File tree

7 files changed

+269
-27
lines changed

7 files changed

+269
-27
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @graphql-ts/schema graphql-yoga example
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# @graphql-ts/schema graphql-yoga example
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { defineConfig } from "drizzle-kit";
2+
23
export default defineConfig({
34
dialect: "sqlite",
45
schema: "./src/db-schema.ts",
56
dbCredentials: {
6-
url: "./dev.db",
7+
url: "file:./dev.db",
78
},
89
});

examples/drizzle-graphql-yoga/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44
"type": "module",
55
"dependencies": {
66
"@graphql-ts/schema": "^1.0.1",
7-
"better-sqlite3": "^11.8.1",
7+
"@libsql/client": "^0.14.0",
88
"drizzle-orm": "^0.40.0",
99
"graphql": "^16.3.0",
1010
"graphql-yoga": "^5.13.1"
1111
},
1212
"devDependencies": {
13-
"@types/better-sqlite3": "^7.6.12",
1413
"@types/node": "^22.13.10",
1514
"drizzle-kit": "^0.30.5",
1615
"tsx": "^4.19.3",

examples/drizzle-graphql-yoga/src/db.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { drizzle } from "drizzle-orm/better-sqlite3";
1+
import { drizzle } from "drizzle-orm/libsql";
22
import * as dbSchema from "./db-schema.js";
33

44
export type DB = ReturnType<typeof createDb>;

examples/drizzle-graphql-yoga/src/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { createDb } from "./db.js";
66

77
const yoga = createYoga({
88
schema,
9-
context: (): Context => ({ db: createDb("./dev.db") }),
9+
context: (): Context => ({ db: createDb("file:./dev.db") }),
1010
});
1111

1212
const server = createServer(yoga);

0 commit comments

Comments
 (0)