File tree Expand file tree Collapse file tree 7 files changed +269
-27
lines changed
Expand file tree Collapse file tree 7 files changed +269
-27
lines changed Original file line number Diff line number Diff line change 1+ # @graphql-ts/schema graphql-yoga example
Original file line number Diff line number Diff line change 1+ # @graphql-ts/schema graphql-yoga example
Original file line number Diff line number Diff line change 11import { defineConfig } from "drizzle-kit" ;
2+
23export default defineConfig ( {
34 dialect : "sqlite" ,
45 schema : "./src/db-schema.ts" ,
56 dbCredentials : {
6- url : "./dev.db" ,
7+ url : "file: ./dev.db" ,
78 } ,
89} ) ;
Original file line number Diff line number Diff line change 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" ,
Original file line number Diff line number Diff line change 1- import { drizzle } from "drizzle-orm/better-sqlite3 " ;
1+ import { drizzle } from "drizzle-orm/libsql " ;
22import * as dbSchema from "./db-schema.js" ;
33
44export type DB = ReturnType < typeof createDb > ;
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ import { createDb } from "./db.js";
66
77const yoga = createYoga ( {
88 schema,
9- context : ( ) : Context => ( { db : createDb ( "./dev.db" ) } ) ,
9+ context : ( ) : Context => ( { db : createDb ( "file: ./dev.db" ) } ) ,
1010} ) ;
1111
1212const server = createServer ( yoga ) ;
You can’t perform that action at this time.
0 commit comments