winsoroaks
Explore posts from serversCCConvex Community
•Created by winsoroaks on 4/29/2025 in #support-community
How to properly combine a Convex query with an action?
I'm trying to implement a query that needs to fetch some encrypted data and decrypt it using AWS KMS. However, I'm running into a TypeScript error where ctx.runAction is not available in the query context. Here's a simplified version of what I'm trying to do:
is the only option to do useEffect in the front end component?
10 replies
CCConvex Community
•Created by winsoroaks on 4/27/2025 in #support-community
How to properly mock Convex internal actions in tests
I'm trying to write tests for a function that uses AWS KMS decryption (
fetchSomething
). This function relies on internal.kms.decrypt
action.
I've tried several approaches but all attempts resulted in type errors or failed decryption.
What's the correct way to mock an internal action in Convex tests?
Example of what I'm trying to test:
2 replies
CCConvex Community
•Created by winsoroaks on 4/23/2025 in #support-community
how to test if schemaValidation = true works in prod without pushing
hi team! how can i test if schemaValidation = true works in prod without pushing? thanks!
7 replies
CCConvex Community
•Created by winsoroaks on 4/22/2025 in #support-community
convex backup
hi team, does the convex backup and restore mean if convex db somehow goes down / dies / gets deleted by some wrong operations by the team, we can restore from the backup?
6 replies
CCConvex Community
•Created by winsoroaks on 4/4/2025 in #support-community
any recommendation on how to store PII?
hi there, im planning to store some PII in the db. while i think convex's architecture is secure, im afraid of getting myself compromised and having attackers peek into my table. hence, im considering storing some sort of encryption key on a 3rd party provider (maybe aws or railway). does that make sense or im overengineering stuff?
7 replies
CCConvex Community
•Created by winsoroaks on 12/29/2024 in #support-community
is there a way to persist env vars of the same preview deployment?
im not sure if im doing sth wrongly, i find that every time i push updated code to the same preview deployment, the env vars are wiped out. is there a way to persist them?
3 replies
CCConvex Community
•Created by winsoroaks on 6/26/2024 in #support-community
tools to subscribe to websocket on the backend?
Hi team! I am planning to build an app that subscribes to some trading activities using convex, what’s the best way to do it? I currently just doing a while True loop, might not be the most efficient thing. Thanks! 😅
9 replies
CCConvex Community
•Created by winsoroaks on 5/20/2024 in #support-community
is there a way to mock the ctx.db.system?
hi team! one of my mutation checks for the image size and store them in my table.
is there a way to handle this from the convex-test package? thanks!
11 replies
CCConvex Community
•Created by winsoroaks on 5/14/2024 in #support-community
queryWithUser is not a function.
(not urgent)
hi team! im working on some unit tests. the convex-test library is awesome and fun! however, im running into a weird scenario (not related to the lib perhaps).
and when i run vitest, im getting
but when i hard code the LIMIT to be 100, it works. any idea what's wrong? 🙏
2 replies
CCConvex Community
•Created by winsoroaks on 5/14/2024 in #support-community
query and update inside for-loop
(not urgent)
hi team! im running into a weird situation. hopefully it's just that im blind to the logic implementation. i have the following code that "updates" the usage table with the image size the user uploaded
im not sure why the usage returned is 0, 0, 0 where i'd expect it to be 0, 93558, 93558 + 68153. i managed to change the implementation to the following:
which is def more efficient and worked. im just curious if there's some special case with my first implementation. thank you.
9 replies
CCConvex Community
•Created by winsoroaks on 5/12/2024 in #support-community
running migration from dashboard

10 replies
CCConvex Community
•Created by winsoroaks on 5/11/2024 in #support-community
run migration on prod before pushing new schema?
i've added a new column to my table, after running a migration on local,
can i run the migration on production before pushing the new schema? i also have rank an optional field now
2 replies
CCConvex Community
•Created by winsoroaks on 5/8/2024 in #support-community
suggestions on improving my architecture? (not really convex specific)

37 replies
CCConvex Community
•Created by winsoroaks on 5/6/2024 in #support-community
another copy of javascript when adding tsconfig.json
i just started to add a
tsconfig.json
to my /convex dir and im getting a copy of js file for every ts file i wrote. this hasnt been the case in the past and i wonder if i've configured something wrongly? here's my tsconfig.json:
thank you 🙂7 replies
CCConvex Community
•Created by winsoroaks on 5/3/2024 in #support-community
when is the best time to create a user entry in the db?
hi all!
im curious what's the best practice here. assume that i have a to-do list app and using clerk for auth. if i allow the user to sign in via google, there's no clear way to do "user has signed up" -> "i need to register user in db."
when should i create an entry of the user in the db? im thinking of when the user has created a to-do list and clicked on the save button, i can check if the user has existed in the
when should i create an entry of the user in the db? im thinking of when the user has created a to-do list and clicked on the save button, i can check if the user has existed in the
users
db and create the entry.
is this reasonable? thank you34 replies
CCConvex Community
•Created by winsoroaks on 4/24/2024 in #support-community
can i do auth or run a function on the server side?
hi all! i have the following code,
and i've been running into the following error when i click on "logout"
is it possible to move
api.db.username
to the server side for this component? or am i taking a wrong path? thanks!3 replies
CCConvex Community
•Created by winsoroaks on 4/5/2024 in #support-community
ConvexChatMessageHistory schema for langchain
Hi @michal, im reading the article: https://stack.convex.dev/ai-chat-using-langchain-and-convex and im trying to understand how the
messages
schema is constructured and its relationship with ConvexChatMessageHistory
.
im currently using a RunnableSequence
and it doesn't save to memory. i have to manually do
however, im running into the error below
to fix this, i had to modify the schema to
any idea why the input is having a diff structure when it tries to write to the db? thank you 🙂2 replies
CCConvex Community
•Created by winsoroaks on 4/4/2024 in #support-community
Adding deps to node.externalPackages didn't resolve the error
Hi team! im running in to the error below
tried a few variations
but didnt fix the issue
any idea what's wrong? thank you.
11 replies
CCConvex Community
•Created by winsoroaks on 4/2/2024 in #support-community
Uncaught Error: Failed to insert or update a document in table "messages" because it does not match
👋 was the ConvexVectorStore updated recently? im following the example from https://stack.convex.dev/ai-chat-using-langchain-and-convex and ran into the error above. was able to fix it by adding
response_metadata: v.optional(v.any())
to the schema2 replies
CCConvex Community
•Created by winsoroaks on 3/10/2024 in #support-community
recommended logger for convex functions?
hi team, i've been using tslog as my logger for my front end stuff. apparently when i try to import it to my convex functions, im getting weird stuff, sth like some byte arrays?
i think i can go with console.log, just wondering if there's some known limitation with my current approach. thanks!
2 replies