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更新了问题,它只是一个输入错误,但实际代码没有输入错误。