Patch not typechecking
for now i do a
db.get
and fill any missing values in the db.patch
with those values but idk y i need to do 2 queries for the sake of typescript??6 Replies
@star ✨ Could you share your code or a small sample that's enough to repro? Sounds frustrating, this isn't a known issue so would love to get a repro.
Glad you're taking a look at it! I'll share the relevant code like so :
For context - nodes are literally nodes on a canvas on my app - theres different kinds of nodes - ones that store text, links etc...
convex/nodes.ts
canvas/schema.ts
on the client:
components/node.tsx (example component - not exactly what i did but close)
Hopefully this gives you enough context? let me know if you require anything else
Could you send a version of the code with the error? vs this already fixed version
Error messages with schema errors on unions could use improving, it's harder to infer intent with unions.
what do you mean version of the code?
Sorry been out, I mean it would help me understand the error to see the code like
where you had a type error, to see the code that you wanted to work
Ah gotcha
Hold on