Search code examples
node.jsgraphqltypegraphql

Graphql type-graphql how to pass one array of objects mutation


I need to pass one array of objects, but says I have to specify the type of parameter I try this line of code. It's not working @Arg("products") products:[ReservationProduct]


Solution

  • @Arg("products", type => [ReservationProduct]) products: ReservationProduct[]