0

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.

Ramu Hegde
  • 65
  • 1
  • 12

1 Answers1

4

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
      }
   }
}
Vishwas C
  • 41
  • 1