Error on 3-expression Index
I've got this model in my schema:
And this mutation:
And I'm getting these two errors:
convex/auth/account.ts:27:40 - error TS2345: Argument of type '"by_provider_and_type"' is not assignable to parameter of type '"by_user" | "by_provider" | "by_creation_time"'.
convex/auth/account.ts:27:109 - error TS2339: Property 'eq' does not exist on type 'IndexRange'.
Anyone have any suggestions?3 Replies
I would guess the schema file is not saved, so TypeScript in terminal is going off of the schema without it existing?
🤦♂️ Thanks! Too many tabs open lol
FYI you could get away with just
by_provider_and_type
if you were ok with queries on ['provider', 'providerAccountID']
coming back sorted by type
. You don't have to provide a query against every index field