【问题标题】:Graphql type-graphql how to pass one array of objects mutationGraphql type-graphql如何传递一个对象数组突变
【发布时间】:2020-02-03 22:43:49
【问题描述】:

我需要传递一个对象数组,但是说我必须指定参数的类型,我试试这行代码。它不起作用@Arg("products") products:[ReservationProduct]

【问题讨论】:

标签: node.js graphql typegraphql


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-09-22
    • 2020-08-16
    • 2021-11-10
    • 2017-02-07
    • 2017-09-03
    • 2020-08-23
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多