Dealing with a tricky architecutre problem -- pls help me out.
Working in a Convex backend with Clerk integration. Note that the Clerk integration means I have two separate surfaces for interacting with user data: using ctx.getUserIdentity() to get the JWT data on functions that are directly called from the frontend, OR using the Clerk SDK (e.g. through Node or similar) to get more detailed info about the user. Note that these have completely different return types that, afaict, cannot be reconciled.
Our current architecture is something like this: have a query and mutation pair which store and update/insert the user from the client; i.e., the client logs in via Clerk, on the first page load, a hidden provider component loads; the providers calls a mutation on the backend, which reads the Clerk user data from JWT and stores it in the DB. The only data that is stored is user.subject (which apparently is some kind of identifier) and their name.
Trying to add a feature to an internal action which