Skip to content

Commit cd5d289

Browse files
committed
🚧 wip
1 parent 530365f commit cd5d289

19 files changed

+393
-419
lines changed

‎example/src/main.ts‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
assertFindFirstExists,
77
assertFirstEntryExists,
88
} from "../../lib/helpers/helper";
9+
import type { DrizzleTable } from "../../lib/types/drizzleInstanceType";
910
import { relations } from "./db/relations";
1011
import * as schema from "./db/schema";
1112

@@ -23,11 +24,12 @@ export const db = drizzle(
2324
"postgres://postgres:postgres@localhost:5432/postgres",
2425
{
2526
relations,
26-
2727
schema,
2828
},
2929
);
3030

31+
const ad: DrizzleTable<typeof db> = {} as any;
32+
3133
// console.log(db.);
3234

3335
/*
@@ -134,7 +136,7 @@ abilityBuilder.posts.filter("read").by(({ context: _context, entities }) => {
134136
const PostRef = schemaBuilder.drizzleObject("posts", {
135137
name: "Post",
136138
// this is how you can apply application level filter in manual object definitions
137-
applyFilters: abilityBuilder.z_registeredFilters.posts.read,
139+
applyFilters: abilityBuilder._.registeredFilters.posts.read,
138140
fields: (t) => ({
139141
id: t.exposeInt("id"),
140142
content: t.exposeString("content", { nullable: false }),

0 commit comments

Comments
 (0)