我正在Android中使用ApolloClient尝试一个突变查询。下面是我的.graphql
文件
mutation insertAddress($city: String, $landmark: String, $postcode: Int, $state: String, $type: String, $userUuid: String) {
__typename
insert_addresses(objects: {city: $city, landmark: $landmark, postcode: $postcode, state: $state, type: $type, userUuid: $userUuid}) {
returning {
uuid
}
}
}
我得到的错误为com.sample.appInsertAddress.graphql (3:30) Can't parse `Array` value, expected array
请帮我解决这个错误。
你能试试吗
mutation insertAddress($city: String, $landmark: String, $postcode: Int, $state: String, $type: String, $userUuid: String) {
__typename
insert_addresses(objects: [{city: $city, landmark: $landmark, postcode: $postcode, state: $state, type: $type, userUuid: $userUuid}]) {
returning {
uuid
}
}
}