"getManyViaOrThrow" Convex Helper Function Expects 6 Arguments
Relevant Schema:
Mutation:
Error:
I have thoroughly read the "Database Relationships Helpers" article:
https://stack.convex.dev/functional-relationships-helpers
But I can't find an example where he uses 6 arguments, nor can I find any examples or documentation that lists the 6 required arguments.
Database Relationship Helpers
Traverse database relationships in a readable, predictable, and debuggable way. Support for one-to-one, one-to-many, and many-to-many via utility func...
4 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
I restarted the editor and the problem magically resolved itself. It seems that the 6th "required" argument "fieldArg" was a hallucination.
the sixth argument is
field
, which would be required if your index were like index("userId", ["someOtherFieldName"])
https://github.com/get-convex/convex-helpers/blob/ada115ccb530bfb32b8aeb02c601c709a19619ed/packages/convex-helpers/server/relationships.ts#L121GitHub
convex-helpers/packages/convex-helpers/server/relationships.ts at a...
A collection of useful code to complement the official packages. - get-convex/convex-helpers
Ah, I see. Thank you! You guys are saints, I appreciate your time.