Custom query with default argument
I want to write a custom query that adds a default argument.
I would like to add an
organizationId
argument to this custom query so that every consumer of this custom query won't need an organizationId
in the query args.
I'm trying to achieve this to avoid the repeated organizationId
in the args param
I got this working using another approach but I'll like to know if this can be done directly with customQuery
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Customizing serverless functions without middleware
Re-use code and centralize request handler definitions with discoverability and type safety and without the indirection of middleware or nesting of wr...
Thank you @erquhart @jamalsoueidan