How can I access union name? #1300
Answered
by
MichalLytek
johannbrynjar
asked this question in
Q&A
-
Can I have access to the union name when I create a union type? const SearchResultUnion = createUnionType({
name: "SearchResult",
types: () => [Movie, Actor] as const,
}); I am trying to create a generic |
Beta Was this translation helpful? Give feedback.
Answered by
MichalLytek
Jun 22, 2022
Replies: 1 comment
-
I don't think it's easily possible. You need to pass the name explicitly to the generic function. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
johannbrynjar
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't think it's easily possible. You need to pass the name explicitly to the generic function.