-
Notifications
You must be signed in to change notification settings - Fork 102
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Stackblitz
https://stackblitz.com/edit/vitejs-vite-gnkg2sdh?file=src%2FApp.tsx
I'm having this issue when i'm trying to
This are my collections nothing fancy
const playersCollection = createCollection(
queryCollectionOptions({
queryKey: ["jugadores", clubId],
queryFn: async () => {
const results = await call.get<FrappeResponse<Jugador[], { count: number }>>(
"setplus.setplus.doctype.jugador.jugador.get_filtered_jugadores",
{
club: clubId,
page_size: 9999999,
page: 0,
},
);
return results.message.data ?? [];
},
getKey: (item) => item.name,
queryClient,
}),
);
const clientsCollection = createCollection(
queryCollectionOptions({
queryClient,
queryKey: ["clientes", clubId],
queryFn: async () => {
return await db.getDocList<Cliente>("Cliente", {
filters: [["club", "=", clubId]],
fields: ["*"],
limit: 9999999,
});
},
getKey: (item) => item.name,
}),
);
const balancesCollection = createCollection(
queryCollectionOptions({
queryClient,
queryKey: ["balances", clubId],
queryFn: async () => {
return await db.getDocList<BalanceClientePorClub>("Balance Cliente por Club", {
filters: [["club", "=", clubId]],
fields: ["*"],
limit: 9999999,
});
},
getKey: (item) => item.name,
}),
);
const { data } = useLiveQuery((q) =>
q
.from({ player: playersCollection })
.join({ client: clientsCollection }, ({ client, player }) => eq(client.player, player.name))
.join({ balance: balancesCollection }, ({ balance, client }) => eq(balance.client, client.name))
.select(({ player, client, balance }) => ({
player,
client,
balance,
})),
);
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working