amppA
Convex Community2y ago
14 replies
ampp

Session Wrapper with sessionId w/Clerk

I think this is another situation where i have a simple need but most examples are more complex with local storage etc . Now that i've progressed past just using the getIdentity/viewer in most use cases, i need the sessionId in a ton of UI calls to convex.

I just want to have a useSessionQuery that passes in the session id from the clerk useAuth().
The whole app is already wrapped in a ConvexProviderWithClerk and that is my session provider basically?

Maybe id want to modify the ConvexProviderWithClerk instead of importing <SessionProvider> in this case?

I was looking at convex-helpers but that seems to be primarily for local session storage. The stack articles don't reference if you are already using a auth provider.
I would also like to use the queryWithSession wrapper side of things on the convex side but I'm guessing i have to do some customization compared to the docs as I'm forcing ent ergonomics on all functions.

Thanks
Was this page helpful?