> Convex supports indexes containing up
Convex supports indexes containing up to 16 fields. You can define 32 indexes on each table. Indexes can't contain duplicate fields.tried three fields, been battling with typescript for more than an hour gonna continue tomrorow strange, never had issues with convex indexes i wonder if anyone else has succeeded with more than 2 index fields for an index?
34 Replies
What's happening?
I have lots of indexes with lots of fields, what error(s) are you seeing?
also Tiger how do you not have more than two fields in your indexes, you are not convexing hard enough lol
it's a typescript issue? so it may be a problem with the index definition itself, can you show your schema code?
@MapleLeaf π @erquhart
yeah sorry for not being specific
its typescript complaining
guess i gotta convex harder lmfao
i tried just focusing on one mutation, commenting the others out
trying to narrow this down
when i comment in getting the flame progress
user loses its type defintiions
as if everything messus up
https://www.youtube.com/watch?v=6H-PLF2CR18
sunday morning
noth feels better than blasting lofi at full volume
LOFI KEEP YOU SAFE
YouTube
Breathe π Lofi Deep Focus π³ Study/Calm/Heal [ Lofi Hip Hop - Lofi C...
Breathe π Lofi Deep Focus π³ Study/Calm/Heal [ Lofi Hip Hop - Lofi Chill ]
----------------------------------------
β€ Subscribe to LOFI KEEP YOU SAFE: https://www.youtube.com/channel/UCwqMCMwQrzGMSZ-jpZqAs6A
I'm fleece. Hope your day is as motivating as this mix! Subscribe to my channel to get notified when new videos are released.
Peace!
Foll...
only thing missing is the morning coffee
but lemme get in some water first
When you run a function from within another function you have to explicitly type any part of the return value that came from the inner function.
also big cleaned myroom this morning
feels so fucking good
clean room + good music + write loads of code
no way
Actions | Convex Developer Hub
Actions can call third party services to do things such as processing a payment
i see
Used to only affect actions but now that any function can run other functions it can happen to any of them
ERQUAHARTTTT
ty
virtual dap my G
thanks so much
hahaha
but then this should work no
π€
@erquhart
still doesnt work
π
the schema @MapleLeaf π
full current query
what's
convexFlameUnionSchema
?Thatβs still leaning on inference
that seems potentially relevant
oh wait
oh no
yeah i see what erquhart means lol
what am i missing
const user: DataModel['users']['document'] | null
that's the issueshouldnt that be ok
does it work if you remove it?
but also why is that there
type annotation to work around the inference issue
Actions | Convex Developer Hub
Actions can call third party services to do things such as processing a payment
oh :ded:
maybe put an annotation on the
currentUser
query instead?
the return type probablyI canβt remember if this works but try typing that return value as Doc<βflameProgressβ>
issues like this are kind of just a guess lol
Might still be in the inference loop
π€§
this gets the job done
cheers
love you all
gonna add a code comment here
so my future self doesn't get all confused
fair enough
when ure evil enough to think
fwiw this might be why I tend to prefer having functions (like
getCurrentUser(ctx)
) to reuse functionalityits time for me to writer a post
why not to use convex
π€£
justk idding
whata fucking dickhead i wouldve been
lmfao
i mean hey if it has valid criticisms, the convex team would still appreciate it π
yeah, but i guess this is some quriky ts issue π
thats better actually
when i think about it
hmmh
much cleaner
love it