当iam调用此突变时,我得到了错误线程1:EXC_BAD_INSTRUCTION(代码= EXC_I386_INVOP,子代码= 0x0)
这是我的代码
apollo.fetch(query: GetReasonsQuery()){ (result, error) in
let userreports = result?.data?.getReasons
if userreports?.count == 0 || (userreports?.isEmpty)! || userreports == nil
{
print("error")
}
else
{
for i in 0...(userreports?.count)!-1
{
let index = userreports![i]
self.productIdArr.append(index!.id)
self.nameArr.append(index!.name!)
self.statusArr.append(index!.status!)
self.imageArr.append(index!.image!)
}
}
}