Giter VIP home page Giter VIP logo

Comments (11)

b1zantine avatar b1zantine commented on August 15, 2024 2

I can see that issue hasn't been fixed yet. Still, the SDK just checks the query document for the term S3ObjectInput. Some query document need not have this word as part of the query.

request.operation.queryDocument().contains("S3ObjectInput")

The same issue exists in the iOS SDK as well. awslabs/aws-mobile-appsync-sdk-ios#45

from aws-mobile-appsync-sdk-android.

janejjshen avatar janejjshen commented on August 15, 2024 1

Issue still exists - Instead of checking the S3ObjectInput string in the document, we should be looping through the input variables, and check if any is instanceof S3InputObjectInterface. This will be the more flexible approach.

from aws-mobile-appsync-sdk-android.

igormatheus22 avatar igormatheus22 commented on August 15, 2024

Same problem here.

from aws-mobile-appsync-sdk-android.

rohandubal avatar rohandubal commented on August 15, 2024

Hi @SudarAbisheck

Thanks for reporting this. You are right, currently the SDK checking in limited ways about determining if there is complex object present in the mutation. We can surely enhance the checking mechanism.

To make sure we add the right checks, could you elaborate what is your use-case currently? Is the 2nd example which you posted in the issue the exact use-case which you have?

Thanks,
Rohan

from aws-mobile-appsync-sdk-android.

motae99 avatar motae99 commented on August 15, 2024

+1

from aws-mobile-appsync-sdk-android.

scb01 avatar scb01 commented on August 15, 2024

@SudarAbisheck @igormatheus22 @janejjshen @motae99
I have a PR with bug fixes and code changes that will fix this issue - #89. I am targeting to get this out in the next release of the SDK. I will post back on this thread once the release is out.

from aws-mobile-appsync-sdk-android.

scb01 avatar scb01 commented on August 15, 2024

@SudarAbisheck @igormatheus22 @janejjshen @motae99

Version 2.7.3 of the SDK contains the fixes for this issue. Please upgrade to this version and let us know how you it goes.

from aws-mobile-appsync-sdk-android.

janejjshen avatar janejjshen commented on August 15, 2024

Seems to work out quite nicely! Thanks!

Need the following code when initializing the AWSAppSyncClient(small modification from the amplify docs), and I do have to manually find and specify the bucket/key attributes, but overall it saves one upload call which is quite nice!

client = AWSAppSyncClient.builder()
                    .context(context)
                    .awsConfiguration(new AWSConfiguration(context))
                    .s3ObjectManager(new S3ObjectManagerImplementation(new AmazonS3Client(AWSMobileClient.getInstance())))
                    .cognitoUserPoolsAuthProvider(new CognitoUserPoolsAuthProvider() {
                        @Override
                        public String getLatestAuthToken() {
                            try {
                                return AWSMobileClient.getInstance().getTokens().getIdToken().getTokenString();
                            } catch (Exception e){
                                Log.e("APPSYNC_ERROR", e.getLocalizedMessage());
                                return e.getLocalizedMessage();
                            }
                        }
                    }).build();

Is there an equivalent way to download an S3 object automatically? Or do I still need to use the TransferUtility and call download explicitly?

from aws-mobile-appsync-sdk-android.

minbi avatar minbi commented on August 15, 2024

Hi @janejjshen ,

Yes, you will still need to manage the download of the S3 object.

We are closing this issue because there has been confirmation the fix is working. Please feel free to open a new issue if the problem persists. We ask this because closed issues are not actively monitored.

Thanks

from aws-mobile-appsync-sdk-android.

mopilo avatar mopilo commented on August 15, 2024

I'm really stuck here, after adding this line.s3ObjectManager(new S3ObjectManagerImplementation(new AmazonS3Client(AWSMobileClient.getInstance()))). I still get S3 Upload failed.

from aws-mobile-appsync-sdk-android.

mopilo avatar mopilo commented on August 15, 2024

com.apollographql.apollo.exception.ApolloException: S3 upload failed. at com.amazonaws.mobileconnectors.appsync.AppSyncComplexObjectsInterceptor.interceptAsync(AppSyncComplexObjectsInterceptor.java:70) at com.apollographql.apollo.internal.interceptor.RealApolloInterceptorChain.proceedAsync(RealApolloInterceptorChain.java:43) at com.amazonaws.mobileconnectors.appsync.InMemoryOfflineMutationObject.execute(InMemoryOfflineMutationObject.java:52) at com.amazonaws.mobileconnectors.appsync.InMemoryOfflineMutationManager.processNextMutation(InMemoryOfflineMutationManager.java:63) at com.amazonaws.mobileconnectors.appsync.AppSyncOfflineMutationManager.processNextInQueueMutation(AppSyncOfflineMutationManager.java:175) at com.amazonaws.mobileconnectors.appsync.AppSyncOfflineMutationInterceptor$QueueUpdateHandler.handleMessage(AppSyncOfflineMutationInterceptor.java:236) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:203)

from aws-mobile-appsync-sdk-android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.