Skip to content

Not able to match all the interfaces of a union #1179

Answered by MichalLytek
LauraBeatris asked this question in Q&A
Discussion options

You must be logged in to vote

mapperKeys.find((key) => key in mutationValue)

When it encounters code: ErrorCode.DUPLICATE_ENTRY, property, it returns UserError because of that.

Your resolve type solutions looks overengineered. It would be better to just use classes constructors directly, like return new EmailTakenError(...).

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@LauraBeatris
Comment options

Answer selected by LauraBeatris
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants