Next.js reflection fails to destructure @Arg() decorator InputType variables #722
Labels
Community 👨👧
Something initiated by a community
Duplicate 🔑
This issue or pull request already exists
Describe the Bug
I don't understand if it's an issue related to TypeGraphQL or it involves some Babel plugins used to transpile my Next.js application. But when I use
@Arg("input") { var1, var2 }: MyInputType
as a single parameter in a@Mutation()
method in a@Resolver()
class and I try to inline destructure my Input type, TypeGraphQL reflection seems to crash withCannot read property '0' of undefined
.To Reproduce
This is my method that generates the error (and my workaround to fix it):
.babelrc file in my Next.js project root
Expected Behavior
It should work as expected also destructuring variables from the incoming input type.
Environment
Additional Context
The text was updated successfully, but these errors were encountered: