这在 GrqphQL 预期类型中是什么意思 '[OrderCreationNotificationEnum!]

What is this mean in GrqphQL Expected type '[OrderCreationNotificationEnum!]

我有一项服务让我 api 使用,他们正在使用 GraphQL。

除此部分外,其他一切似乎都正常。

我正在使用以下查询创建订单,除了我在其中添加通知时它工作正常

我遇到了这个错误 InputObject 'OrderCreateMutationInput' 上的参数 'notifications' 具有无效值 ({type: {OrderCreationNotificationEnum: {email: true}}})。预期类型“[OrderCreationNotificationEnum!]”

mutation{
orderCreate(input: {
order: {
  externalIds:[
    {key: "VRPOrderId", value: "abc131"}
  ]
  firstName: "John"
  surname: "Doe"
  phone: "0405123456"
  billingFirstName: "John"
  billingSurname: "Doe"
  
  billingEmailAddress: "john@email.com"
  address: {
    address: "1 Bourke Street"
      city: "Melbourne"
      country: {
        code: "AU"
      }
      postcode: "3000"
      state: {
        short: "VIC"
      }
  }
  billingAddress:{
    address: "1 Bourke Street"
      city: "Melbourne"
      country: {
        code: "AU"
      }
      postcode: "3000"
      state: {
        short: "VIC"
      }
  }
  termsAndConditionsAccepted: true
  
}
lineItems: [
  {             
    variantId: "VmFyaWFudC00NzMz"
    quantity: 1
    totalCents: 22500
    postageCents: 1000
    
  },
  {             
    variantId: "VmFyaWFudC00NzYy"
    quantity: 1
    totalCents: 22500
    postageCents: 500
    
  }
]
notifications:
{
    type: {
        OrderCreationNotificationEnum: {
            email: true
        }
    } 
}

})
{
order{
  id
  invoices{
    edges{
      node{
        id
        lineItems{
          id
          quantity
        } 
      }  
    }
  }
}
 status
}
}

我正在努力让通知正常工作。我也在为说明添加 link。请帮忙

link to api document

Argument 'notifications' on InputObject 'OrderCreateMutationInput' is an Enum:

enum OrderCreationNotificationEnum {
    # Notify the order information via Email
    EMAIL
    # Notify the order information via SMS
    SMS
}

对于通知,您应该指定一个枚举值数组,如下所示:

notifications: [EMAIL, SMS]