mikeysee
mikeysee
CCConvex Community
Created by Riki on 12/15/2024 in #support-community
.paginate combined with .withIndex is causing an error
Hi Pierre I personally havent encountered this but I saw something similar mentioned recently by @lee on our Slack:
this would happen if you call .paginate in two different branches. it doesn't know how to continue the pagination like if you do if (Math.random() < 0.5) { return await ctx.db.query("messages").paginate(opts); } else { return await ctx.db.query("users").paginate(opts); } then the cursors would get confused, because a cursor into the messages table can't be used in the users table
Im a little confused however as it seems like you arent branching in your query here so it should work 🤔
30 replies
CCConvex Community
Created by codebird on 12/3/2024 in #support-community
Convex's compatibility
Is it possible to talk to the Convex database in natural language?
It definitely is possible to use Cursor or Copilot or one of these to generate Convex query code, quite a lot of us already do do this and it works pretty well again @Omar or @Matt Luo might be able to offer some more specific tips to help with getting the best out of the codegen there. Currently the dashboard doesn't directly allow you to prompt then generate queries like you show in that postgres example tho that would be a pretty cool feature!
18 replies
CCConvex Community
Created by codebird on 12/3/2024 in #support-community
Convex's compatibility
Does Convex already support Realtime API support for Open AI over Websockets?
I personally havent done anything yet with the Realtime API but I really would like to. Are you asking is Convex able to open a websocket from an action?
18 replies
CCConvex Community
Created by codebird on 12/3/2024 in #support-community
Convex's compatibility
As for:
Related to this only, is Convex compatible with the emerging protocols which link to external data and systems like Model Context Protocol(MCP) by Anthropic?
@Omar one of our Community Champions might be a good person to talk to about that. I personally havent done any but I know he has been tinkering with it lately.
18 replies
CCConvex Community
Created by codebird on 12/3/2024 in #support-community
Convex's compatibility
Hey @codebird wow the field sure is moving fast! I thought I was pretty connected into things but I havent even heard of mastra.ai. I have made a task to spend some time to deep dive into it tho as it looks super interesting.
18 replies
CCConvex Community
Created by Pedram on 11/22/2024 in #support-community
Type error on internal query
Tom beat me to it, but no you cant call them directly from Actions. Checkout the docs on actions here: https://docs.convex.dev/functions/actions As Tom mentioned you can use runQuery to get the data you need. The query could also be an internalQuery if you didnt want to expose that particularly set of data to the client. Another approach I like to do is to simply pass in the data that the action needs via its args. This will "freeze" the data at the time you schedule or call that action however so that may or may not be what you want to do.
9 replies
CCConvex Community
Created by mikeysee on 9/29/2023 in #support-community
Convex and State Machines
Im not 100% sure if the developer that led that did end up using xstate in the end, I think he ran into some issues. Its on my list to dive in deeper very soon.
15 replies
CCConvex Community
Created by mikeysee on 9/29/2023 in #support-community
Convex and State Machines
ahhh hahha, yes we did indeed build a tournaments product: https://tournaments.battletabs.io/
15 replies
CCConvex Community
Created by mikeysee on 9/29/2023 in #support-community
Convex and State Machines
Sorry I have a terrible memory, remind me? 😛
15 replies
CCConvex Community
Created by mikeysee on 9/29/2023 in #support-community
Convex and State Machines
Ye this is something I would like to dig into a bit futher too. I think your mental model of Convex as "the single source of truth" is the right one (until you introduce local state). An ex-colleague of mine experimented with xstate and Convex, I need to look through that a bit more carefully but I agree it seems like it could be a powerful combination. If I was just starting out on Convex I probably wouldnt dive right into using Convex and XState together, it would probably be wiser to get a project (even if its small) under your belt that uses just convex first so you can get a better intuitive understanding of how all the bits fit together. Having said that however, if you do play with xstate on the backend I would be very interested to hear how you get on, what your experiences are with it, what lessons you learnt etc 🙂
15 replies
CCConvex Community
Created by Jayzus on 9/27/2024 in #support-community
Legend-State plugin for local-first
This is really cool! Might I suggest that instead of id which might get confusing given Convex's _id we call it clientSyncKey or something like that? Or even better have it as a config param on the plugin so users can choose whatever key they want to use themselves? Really looking forward to see this develop 🙂
109 replies
CCConvex Community
Created by Jayzus on 9/27/2024 in #support-community
Legend-State plugin for local-first
Im watching this thread like a hawk. For context there has also been plenty of discussion on offline-first statemanagement for convex in the past. This is one of the more recent discussions: https://discord.com/channels/1019350475847499849/1242127900052819998/1242127900052819998
109 replies
CCConvex Community
Created by Sean Knowles on 5/20/2024 in #support-community
offline first?
Theres some movement on using Legend-State on this thread, that might be relevant to this thread https://discord.com/channels/1019350475847499849/1289187277465059338/1291152193591836692
23 replies
CCConvex Community
Created by mikeysee on 9/2/2024 in #support-community
Is there a cached query version of usePagniatedQuery?
oh fantastic thanks Jamie. Im thinking it is probably possible to manually do this if you keep track of pages and overlaps and stuff, you could get close. But looking forward to see what your new thinking on this is
5 replies
CCConvex Community
Created by kstulgys on 1/20/2024 in #support-community
So close to make puppeteer working
did you manage to get this to work in the end @kstulgys ?
15 replies
CCConvex Community
Created by mikeysee on 8/6/2024 in #support-community
Faster websocket connection? Or skip websocket connection?
ooo yes this does look like it should do what I need, thanks!
7 replies
CCConvex Community
Created by mikeysee on 8/6/2024 in #support-community
Faster websocket connection? Or skip websocket connection?
ah I just saw I can set the TokenStorage. https://labs.convex.dev/auth/api_reference/react#convexauthprovider perhaps I should intercept that? can I use that token for the http client?
7 replies
CCConvex Community
Created by mikeysee on 8/6/2024 in #support-community
Faster websocket connection? Or skip websocket connection?
Convex Auth (https://labs.convex.dev/auth). Just passwords for now
7 replies
CCConvex Community
Created by mikeysee on 8/6/2024 in #support-community
Faster websocket connection? Or skip websocket connection?
The other way I have thought of doing it is introducing a new table "ApiKeys". When the extension authenticates for the first time it also allocates an API key for the user. This is then stored locally and used in future http client calls. Ill probably go with this if there is no better solution
7 replies
CCConvex Community
Created by mikeysee on 7/31/2024 in #support-community
GET /.well-known/openid-configuration is 404'ing with Convex Auth
Oh so dumb of me of course! Thanks @Michal Srb 🙂
3 replies