Skip to content

Commit

Permalink
Remove conditional queryCallback
Browse files Browse the repository at this point in the history
Conditional queryCallback wasn't documented, and it's an antipattern. With Kysely Relations, it's possible to use subqueries.
  • Loading branch information
steida committed Oct 26, 2023
1 parent db84a4e commit 8eaff48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .changeset/hot-moons-invent.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@evolu/common-react": patch
---

Remove conditional queryCallback

Conditional useQuery callback wasn't documented, and it's an antipattern. With Kysely Relations, it's possible to nest related rows in queries now.
3 changes: 1 addition & 2 deletions packages/evolu-common-react/src/React.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {
FilterMap,
FlushSync,
NanoId,
OrNullOrFalse,
Owner,
OwnerActions,
Platform,
Expand Down Expand Up @@ -157,7 +156,7 @@ type UseQuery<S extends Schema> = <
QueryRow extends Row,
FilterMapRow extends Row,
>(
queryCallback: OrNullOrFalse<QueryCallback<S, QueryRow>>,
queryCallback: QueryCallback<S, QueryRow>,
filterMap: FilterMap<QueryRow, FilterMapRow>,
) => {
/**
Expand Down

1 comment on commit 8eaff48

@vercel
Copy link

@vercel vercel bot commented on 8eaff48 Oct 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

evolu – ./

evolu-evolu.vercel.app
evolu.vercel.app
www.evolu.dev
evolu-git-main-evolu.vercel.app
evolu.dev

Please sign in to comment.