How do I use internal mutations?
I am trying to upload generated images to Convex DB and following this Convex tutorial: https://docs.convex.dev/file-storage/store-files. However I am getting this error when I try to call the mutation, any pointers?: (Attached Schema and Error)
Property 'TodayLunchPhoto' does not exist on type '{ upload: { saveStorageId: FunctionReference<"mutation", "internal", { storageId: Id<"_storage">; }, -1 | null>; }; }'
1 Reply
You'll want to use the path to the file that holds the query, not the table name.
So for example, if your
saveStorageId
internal mutation is defined in convex/todayLunch.ts
, you'll reference the mutation as:
You can read the docs on how query/mutation names work here: https://docs.convex.dev/functions/query-functions#query-names