From 23987e4f876a8e8f3d27818fcc4445eff80f89b7 Mon Sep 17 00:00:00 2001 From: Max Koon <22125083+k2on@users.noreply.github.com> Date: Wed, 15 Oct 2025 06:44:52 -0400 Subject: [PATCH] fix: don't support old queries and mutators in schema --- api/src/zero.ts | 7 +++++++ app/_layout.tsx | 2 +- app/index.tsx | 3 +++ shared/package.json | 2 +- shared/src/mutators.ts | 5 ++++- shared/src/schema.ts | 10 ++-------- shared/src/zero-schema.gen.ts | 4 ++-- 7 files changed, 20 insertions(+), 13 deletions(-) diff --git a/api/src/zero.ts b/api/src/zero.ts index 9786c10..ec01ca6 100644 --- a/api/src/zero.ts +++ b/api/src/zero.ts @@ -17,6 +17,7 @@ import { } from "@money/shared"; import type { AuthData } from "@money/shared/auth"; import { getHono } from "./hono"; +import { db } from "./db"; const processor = new PushProcessor( @@ -30,6 +31,12 @@ const createMutators = (authData: AuthData | null) => { const mutators = createMutatorsShared(authData); return { ...mutators, + link: { + ...mutators.link, + async create() { + console.log("Here is my function running on the server!!!"); + } + } } as const satisfies Mutators; } diff --git a/app/_layout.tsx b/app/_layout.tsx index e927dc5..2688baf 100644 --- a/app/_layout.tsx +++ b/app/_layout.tsx @@ -44,7 +44,7 @@ export default function RootLayout() { - + diff --git a/app/index.tsx b/app/index.tsx index c641029..6158cbb 100644 --- a/app/index.tsx +++ b/app/index.tsx @@ -32,6 +32,9 @@ export default function HomeScreen() {