awslabs / aws-mobile-appsync-sdk-android

Android SDK for AWS AppSync.
https://docs.amplify.aws/sdk/api/graphql/q/platform/android/
Apache License 2.0
105 stars 58 forks source link

Multiple file upload does not work #188

Open Yegorisa opened 5 years ago

Yegorisa commented 5 years ago

Bug description I have a mutation which includes 4 complex S3ObjectInput but when I call it AppSync client uploads only first one.

mutation SendRideData(
        $id: String!,
        $workoutName: String!,
        $email: AWSEmail!,
        $duration: Int!,
        $powerAvg: Int!,
        $powerMax: Int!,
        $rpmAvg: Int!,
        $rpmMax: Int!,
        $hrAvg: Int!,
        $hrMax: Int!,
        $json: S3ObjectInput,
        $tcx: S3ObjectInput,
        $imageRPM: S3ObjectInput,
        $imageHR: S3ObjectInput,
        $imagePower: S3ObjectInput) {
  rideDataEmail(input: {
    id: $id
    workoutName: $workoutName
    email: $email
    duration: $duration
    powerAvg: $powerAvg
    powerMax: $powerMax
    rpmAvg: $rpmAvg
    rpmMax: $rpmMax
    hrAvg: $hrAvg
    hrMax: $hrMax
    tcx: $tcx
    imageRPM: $imageRPM
    imageHR: $imageHR
    json: $json
    imagePower: $imagePower
  }) {
    workoutName
    email
    json {
      bucket
      key
      region
    }
  }
} 

Expected behavior To upload all of the S3ObjectInput objects

Environment(please complete the following information):

Yegorisa commented 5 years ago

I found also a similar issue for JavaScript sdk https://github.com/awslabs/aws-mobile-appsync-sdk-js/issues/161. I suspect Android SDK has the similar one

desokroshan commented 5 years ago

@Yegorisa Thanks for reporting this. I will investigate the issue and post an update.

Yegorisa commented 5 years ago

@desokroshan I have submitted a pull request with a fix of this issue. Pull request link

desokroshan commented 5 years ago

@Yegorisa Thanks for the PR. I will review it soon as I can.