Mapping defined types to other defined types
I have two types:
And
As you can see,
DecisionStatus
overlaps with ReferralOverviewStatus
.
In one mutation, I accept an args type of DecisionStatus
and I want to pass it to a mutation that accepts an arg type of ReferralOverviewStatus
. I've tried a bunch of different things but I still get typescript errors for all of these. How can I make this work?6 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 made a manual
type
of just plain strings for ReferralOverviewStatus
as :
Then passed it like so:
This seems to work. But is there any easier way than having to write separate plain js types
that are really the same thing as the v
type?@CabalDAO have you tried this approach?
e.g.
The easist way to do that
`
Lets gooooo...
thank you for this!
very helpful