Releases: ardsh/slonik-trpc
Releases · ardsh/slonik-trpc
v0.15.7
Patch Changes
- c8dffce: Added context passing functions in buildView
v0.15.6
Patch Changes
- 44c0aa1: Fixed comparison filter, added playground link
v0.15.5
Patch Changes
- d54d0aa: Added load function to buildView
v0.15.4
Patch Changes
- 083bc12: Allowing WITH queries to be used in select
v0.15.3
Patch Changes
- e101dd8: Added auth constraints in buildView
v0.15.2
Patch Changes
-
164870e: Added index in virtual field resolve args
BREAKING CHANGE: Removed virtualFieldLoaders
option.
Also, don't forget to enable orFilterFilter: true
in makeQueryLoader
options if you want to keep using the OR
filters. They're disabled by default now.
v0.15.1
Patch Changes
-
f73a0a9: Added virtual field loaders. These are meant to allow efficient loading of data, for multiple rows at once.
Instead of fetching data in the virtual field resolver, one row at a time, you can use a virtual field loader, and then have access to the data in the 3rd argument of the resolver.
virtualFieldLoaders: {
posts: async (rows) => {
const allPosts = await fetchPostsForAuthors(rows.map(row => row.id));
return allPosts;
},
},
virtualFields: {
posts: {
dependencies: ["id"],
resolve: (row, args, posts) => {
return posts.filter(post => post.authorId = row.id)
}
}
},
v0.15.0
Minor Changes
- e6ad803: Added buildView utilty for building easier filters.
Backwards compatible change but deprecated older method for creating filters.
v0.14.3
Patch Changes
- e934989: fix: Fixed virtual fields transform columns
v0.14.2
Patch Changes
- c79cd97: feat: Added the ability to transform sql column names