Paginated Query With Empty String Argument Gives Unexpected Results
I have a paginated query implemented something like this
and when argument to the query is
{ clerkId: "" }
, it gives me back documents where the clerkId field is a non-empty string. I've noticed that it works fine when the argument is a non-empty string. So what's the deal with the empty string?
I see this behaviour in my app, as well as running the function on convex dashboard.
If you want more details of the specific convex instance, dm me.6 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!
that doesn't repro for me. can you give more details?
i'm running this query
with arguments
where there's a document in the "TableName" table which has
{clerkId: "yo"}
I guess it depends on the database instance. For example, I was not able to reproduce this in my own development instance, but was able to reproduce in production and in another developer's instance
this sounds like a convex bug. if you could help us reproduce it, that would be very helpful
Can we take this into a non-public chat
I can give more details there
sure you can DM me or email support@convex.dev
to wrap up here, the query was within a
if (args.clerkId) {
which is false for the empty string, so it was actually a different query that was running. phew