erquhart
CCConvex Community
•Created by erquhart on 10/7/2024 in #support-community
npx dev --run <func> no longer works
Using latest, 1.16.3. It looks like
npx dev --run <func>
no longer runs the provided function.3 replies
CCConvex Community
•Created by erquhart on 10/5/2024 in #support-community
Accessing deployment metadata via cli
Is it possible to get the deploy urls via cli?
3 replies
CCConvex Community
•Created by erquhart on 9/4/2024 in #support-community
Convex cache `useQuery` breaks type safety
Any chance I'm holding this wrong?
5 replies
CCConvex Community
•Created by erquhart on 9/3/2024 in #support-community
Filter context menu shortcuts not working
For example, if I right click a cell and select filter by > equals "<value>", the filter that's added is "equals
null
". Even if I select a different option from the context menu, such as greater than, the resulting filter is always "equals null
".3 replies
CCConvex Community
•Created by erquhart on 8/22/2024 in #support-community
Convex Auth: a delete user method in useAuthActions (or somewhere)
I'm writing some mutations to also delete records in the auth tables generated by Convex Auth. Would be nice to have a deleteUser method provided by the lib so mutating auth table internals isn't required.
2 replies
CCConvex Community
•Created by erquhart on 8/16/2024 in #support-community
Cache vs memory perf in convex function scope
My understanding is that any query that runs in a convex query/mutation only runs against the database once, and further calls return a cached response. I'm trying to understand if this is effectively in-memory.
Contrived scenario:
- A query needs to return a list of hundreds of restaurants from the restaurants table
- Each restaurant can be in one of 10 total regions from the regions table
Option A:
- Run an indexed query that gets all of the regions up front
- Synchronously map over the list of restaurants and add the region data to each
Option B:
- Asynchronously map over the list of restaurants and run
ctx.db.get()
for each region id, resulting in many duplicate calls to the same query
One would assume that option A will be more performant. But if caching is deduped and truly in-memory, it probably won't be meaningfully different. Is one approach better? Does it become worthwhile at scale?4 replies
CCConvex Community
•Created by erquhart on 8/15/2024 in #support-community
Filter context menu for table header row
Tiny one: I keep instinctively right-clicking on the header cells to quickly set a filter, and I get the default browser context menu. Would be cool to get an in-app context menu even if it just had the
filter by <field>
option.5 replies
CCConvex Community
•Created by erquhart on 8/15/2024 in #support-community
Project settings sidebar link opens in a new page
6 replies
CCConvex Community
•Created by erquhart on 8/15/2024 in #support-community
Is _creationTime guaranteed unique?
I've understood this to be true, but read in a post here (I can't find it now) something that hinted at this maybe not being a 100% guarantee. I have logic that relies on this value being unique, so just wanted to make sure.
10 replies
CCConvex Community
•Created by erquhart on 8/15/2024 in #support-community
Feature request: saved filters in the dashboard
Would be cool to have the ability to save and name a filter, values and all, for a given table. Would use this a lot, and it would probably increase my usage of the dashboard in general.
8 replies
CCConvex Community
•Created by erquhart on 8/13/2024 in #support-community
Convex Auth signaling unauthenticated in RN after inactive
I haven't been able to capture much on this, but I've seen this consistently since migrating to Convex Auth:
- After opening the iOS app when it's been in the background, we're redirecting to sign in
- The logic currently in place will only do this if both
isAuthenticated
and isLoading
from useConvexAuth()
are false
.
- I've added logic to listen for further changes to these values, and also added a user query that waits for an authenticated user to come back, none of this is working
- Closing the app completely and reopening causes the currently authenticated user to be recognized
I'm trying to get more insight to share, but wanted to bring this here in case anything jumps out at anyone. It's becoming a bit of a pain that the app effectively redirects to sign on most occasions, even though the user is authenticated. I'm not building for web, and am only assuming this is RN specific. Maybe something to do with secure storage?59 replies
CCConvex Community
•Created by erquhart on 8/11/2024 in #support-community
Convex Query Cache context not reachable for useQuery
I'm using the query cache provider and hook from convex-helpers. I've set it up properly and checked that the hook actually is getting the context object, but the
register
key of the object is null, which is what causes it to throw. I have a lot of providers, including my own custom ones, and I've never had one inexplicably not have a context value make it down the tree.
I don't have a repro put together or anything, but just wanted to see if anyone had run into this, or had any ideas.32 replies
CCConvex Community
•Created by erquhart on 8/10/2024 in #support-community
Authentication fails on the server when the client crashes
Using expo / react native, so not sure if this happens on the web, but when an error occurs in the client (and is caught in the error boundary wrapping the app), all active queries fail as unauthenticated. This has been the case for as long as I've used Convex, and hasn't been an issue, but I now have logic to log the client out when an auth error comes back from Convex, so I'm constantly getting logged out during development.
Obviously I can condition the logout logic based on environment, but I avoid environment awareness in my application code. This will be my approach for now, but wanted to raise this in case I'm missing something.
1 replies
CCConvex Community
•Created by erquhart on 8/9/2024 in #support-community
Clicking the copy icon doesn't work in the dashboard
3 replies
CCConvex Community
•Created by erquhart on 8/6/2024 in #support-community
Hover/select in dashboard project selector is confusing
16 replies
CCConvex Community
•Created by erquhart on 7/31/2024 in #support-community
Setting oauth scopes with Convex Auth
This may be Auth.js specific, but I'm hoping it can be handled in the Convex Auth api. The default scope for GitHub OAuth includes a user's private profile data, rather than just their email. I'd like to use
read:user
scope only. Is there a way to do that currently?3 replies
CCConvex Community
•Created by erquhart on 7/28/2024 in #support-community
Support `--success` with `npx convex dev --tail-logs`
Maybe
--tail-logs-success
as an additional flag? (or by default)19 replies
CCConvex Community
•Created by erquhart on 7/18/2024 in #support-community
Convex Auth OTP requires redirect url or SITE_URL
When attempting to use the OTP method alone, SITE_URL is required (unless you provide a redirect url).
This line in particular leads to a thrown error: https://github.com/get-convex/convex-auth/blob/90318a4d346523035ed9c75e70cd99653a5bede9/src/server/implementation.ts#L1744
I'm not yet processing links inbound to my react native app, so I don't want to use magic links and don't have a redirect url or site url to use, hence my interest in OTP-only.
9 replies
CCConvex Community
•Created by erquhart on 7/18/2024 in #support-community
NoImportModuleInSchema
I've only seen this mentioned in one place in Discord, and nowhere else otherwise.
I just finished the code migration from Clerk to Convex Auth and followed the docs pretty closely, and am now getting this when attempting to deploy (dev).
Just to help me debug, can someone explain exactly what this error means, generically? I keep my table definitions in per-table files and import them all to
schema.ts
, and that has never been a problem. What are the things that can't be imported to the schema file?15 replies
CCConvex Community
•Created by erquhart on 7/11/2024 in #support-community
Record counts for large numbers of records is non-trivial
I've handled counting needs for large numbers of records (any amount greater than I can reasonably list purely for a count, so over 500 maybe) by keeping count fields and incrementing/decrementing at write time.
I'm now noticing failures due to that number changing too much during batch mutations, so I'm having to rework to add special handling for those cases. Which is making me realize there are other such cases in my codebase that are probably just a chance away from a random failure.
I'm thinking through other novel approaches, such as updating count daily or on certain events, by paginating through the records and updating a given count field as a whole. But that's a lot of data moving out of the database just to get a count.
I know a number of questions have come around getting counts in this support forum. Are there better solutions on the way? This is one of those few problems that are actually harder with Convex than with a traditional db, would be nice to eventually check it off the list.
For now I'm moving toward avoiding the need for counts altogether, but that's not a fun way to steer product decisions. Thoughts/suggestions appreciated!
23 replies