convex-helpers
Advanced tools
Comparing version 0.1.55 to 0.1.56-alpha.0
{ | ||
"name": "convex-helpers", | ||
"version": "0.1.55", | ||
"version": "0.1.56-alpha.0", | ||
"description": "A collection of useful code to complement the official convex package.", | ||
@@ -5,0 +5,0 @@ "type": "module", |
@@ -72,3 +72,3 @@ import { OptionalRestArgsOrSkip, RequestForQueries } from "convex/react"; | ||
*/ | ||
export declare function useQuery<Query extends FunctionReference<"query">>(query: Query, ...queryArgs: OptionalRestArgsOrSkip<Query>): FunctionReturnType<Query>; | ||
export declare function useQuery<Query extends FunctionReference<"query">>(query: Query, ...queryArgs: OptionalRestArgsOrSkip<Query>): FunctionReturnType<Query> | undefined; | ||
//# sourceMappingURL=hooks.d.ts.map |
@@ -132,3 +132,3 @@ import { | ||
...queryArgs: OptionalRestArgsOrSkip<Query> | ||
): FunctionReturnType<Query> { | ||
): FunctionReturnType<Query> | undefined { | ||
const args = queryArgs[0] ?? {}; | ||
@@ -135,0 +135,0 @@ // Unlike the regular useQuery implementation, we don't need to memoize |
@@ -26,3 +26,3 @@ /** | ||
* return await filter( | ||
* ctx.db.query("messages").withIndex("by_author, q=>q.eq("author", args.author)), | ||
* ctx.db.query("messages").withIndex("by_author", q=>q.eq("author", args.author)), | ||
* async (message) => message.body.length < 10, | ||
@@ -39,3 +39,3 @@ * ).paginate(args.paginationOpts); | ||
* return await shortMessages | ||
* .withIndex("by_author, q=>q.eq("author", args.author)) | ||
* .withIndex("by_author", q=>q.eq("author", args.author)) | ||
* .paginate(args.paginationOpts); | ||
@@ -42,0 +42,0 @@ * |
@@ -108,3 +108,3 @@ /** | ||
* return await filter( | ||
* ctx.db.query("messages").withIndex("by_author, q=>q.eq("author", args.author)), | ||
* ctx.db.query("messages").withIndex("by_author", q=>q.eq("author", args.author)), | ||
* async (message) => message.body.length < 10, | ||
@@ -121,3 +121,3 @@ * ).paginate(args.paginationOpts); | ||
* return await shortMessages | ||
* .withIndex("by_author, q=>q.eq("author", args.author)) | ||
* .withIndex("by_author", q=>q.eq("author", args.author)) | ||
* .paginate(args.paginationOpts); | ||
@@ -124,0 +124,0 @@ * |
@@ -160,3 +160,3 @@ /** | ||
* return await filter( | ||
* ctx.db.query("messages").withIndex("by_author, q=>q.eq("author", args.author)), | ||
* ctx.db.query("messages").withIndex("by_author", q=>q.eq("author", args.author)), | ||
* async (message) => message.body.length < 10, | ||
@@ -173,3 +173,3 @@ * ).paginate(args.paginationOpts); | ||
* return await shortMessages | ||
* .withIndex("by_author, q=>q.eq("author", args.author)) | ||
* .withIndex("by_author", q=>q.eq("author", args.author)) | ||
* .paginate(args.paginationOpts); | ||
@@ -176,0 +176,0 @@ * |
Sorry, the diff of this file is not supported yet
721477