Reputation: 65
I'm trying a mutation query in Android using ApolloClient below is my .graphql
file
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
}
}
}
I'm getting the error as com.sample.app\InsertAddress.graphql (3:30) Can't parse `Array` value, expected array
Please help me to solve this error.
Upvotes: 0
Views: 1244
Reputation: 41
Can you try
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
}
}
}
Upvotes: 4