We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bc28a6 commit 3f9efd6Copy full SHA for 3f9efd6
packages/convex-helpers/README.md
@@ -81,7 +81,7 @@ You can take in extra arguments to a custom function by specifying the type of a
81
82
```ts
83
const myQueryBuilder = customQuery(query, {
84
- args: { },
+ args: {},
85
input: async (ctx, args, { role }: { role: "admin" | "user" }) => {
86
const user = await getUser(ctx);
87
if (role === "admin" && user.role !== "admin") {
@@ -91,12 +91,12 @@ const myQueryBuilder = customQuery(query, {
91
throw new Error("You must be logged in to access this query");
92
}
93
return { ctx: { user }, args: {} };
94
- }
+ },
95
});
96
97
const myAdminQuery = myQueryBuilder({
98
role: "admin",
99
100
handler: async (ctx, args) => {
101
// ...
102
},
0 commit comments