Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/elixir/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Elixir 长生不老药苦艾酒输入对象_Elixir_Absinthe - Fatal编程技术网

Elixir 长生不老药苦艾酒输入对象

Elixir 长生不老药苦艾酒输入对象,elixir,absinthe,Elixir,Absinthe,为什么在长生不老药苦艾酒中输入对象不起作用 像 我尝试了,但它为以下有效负载抛出了错误 mutation() { employee: createEmployee(vehicleDetails: { registrationNo: "AP03EY0096", imageUrl: "http://sample.example.com" }) { id } } 错误 In field \"vehicleDetails\": Expected type \

为什么在长生不老药苦艾酒中输入对象不起作用

我尝试了,但它为以下有效负载抛出了错误

mutation() {
  employee: createEmployee(vehicleDetails: {
      registrationNo: "AP03EY0096",
      imageUrl: "http://sample.example.com"
  }) {
    id
  }
}
错误

In field \"vehicleDetails\": Expected type \"VehicleDetail\", found $vehicleDetails.\nIn field \"imageUrl\": Unknown field.\nIn field \"registrationNo\": Unknown field.",

请尝试在输入对象定义中使用snake case中的原子:

  input_object :vehicle_detail do
    field(:registration_no, :string)
    field(:image_url, :string)
  end

请尝试在输入对象定义中使用snake case中的原子:

  input_object :vehicle_detail do
    field(:registration_no, :string)
    field(:image_url, :string)
  end

intput\u object
中有一个输入错误,您已获得错误原因。intput_对象-:车辆_详细信息具有驼峰大小写字段名称。更改为snake case后,它起了作用。@JonasDellinger Thank更新了问题,它只是一个输入错误,但实际代码没有输入错误。
intput\u object
,designed?获得了错误原因。intput_对象-:车辆_详细信息具有驼峰大小写字段名称。更改为snake case后,它起了作用。@JonasDellinger Thank更新了问题,它只是一个输入错误,但实际代码没有输入错误。