@@ -6,7 +6,11 @@ import {
66 assertFindFirstExists ,
77 assertFirstEntryExists ,
88} from "../../lib/helpers/helper" ;
9- import type { DrizzleQueryFunction , InternalDrizzleInstance } from "../../lib/types/drizzleInstanceType" ;
9+ import type {
10+ DrizzleQueryFunction ,
11+ DrizzleQueryFunctionInput ,
12+ InternalDrizzleInstance ,
13+ } from "../../lib/types/drizzleInstanceType" ;
1014import { relations } from "./db/relations" ;
1115import * as schema from "./db/schema" ;
1216
@@ -28,8 +32,6 @@ export const db = drizzle(
2832 } ,
2933) ;
3034
31-
32-
3335const d = rumble ( {
3436 // here we pass the db instance from above
3537 db,
@@ -50,11 +52,6 @@ const d = rumble({
5052 // },
5153} ) ;
5254
53- d . query .
54-
55-
56- // console.log(db.);
57-
5855/*
5956
6057 Next, we can create a rumble instance. The creator returns a set of functions which you
@@ -78,12 +75,13 @@ const {
7875 // it takes a request object as an argument and returns the objects you want in the request context
7976 // similar to the context callback in express or similar frameworks
8077 // the type of the request parameter may vary based on the HTTP library you are using
81- context ( _request )
78+ context ( _request ) {
8279 return {
8380 // for our usecase we simply mock a user ID to be set in the context
8481 // this will allow us to perform permission checks based on who the user is
8582 userId : 2 ,
86- } ; ,
83+ } ;
84+ } ,
8785 // in case you want to allow searching via string in the helper implementations
8886 // search: {
8987 // enabled: true,
0 commit comments