Comments (11)
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.
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.
Same problem here.
from aws-mobile-appsync-sdk-android.
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.
+1
from aws-mobile-appsync-sdk-android.
@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.
@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.
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.
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.
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.
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)
- android.net.ConnectivityManager$TooManyRequestsException HOT 9
- Execution failed for task ':app:nodeSetup'. HOT 5
- Android Studio Bumblebee will further break compatibility with Jetpack libraries HOT 3
- NullPointerException: Attempt to invoke virtual method 'org.json.JSONObject com.amazonaws.mobile.config.AWSConfiguration.optJsonObject(java.lang.String)' on a null object reference HOT 3
- No ability to serlialize null input fields
- App Sync SDK crashing with SQLiteBlobTooBigException HOT 4
- How can we encrypt cache data
- AppSync codegen models throws @Nullable @Nullable HOT 4
- AppSync codegen model "S3ObjectInput" methods override error
- Cognito API InitiateAuth + REFRESH_TOKEN_AUTH does not return updated RefreshToken HOT 2
- Fatal Exception: java.lang.NullPointerException: Parameter specified as non-null is null
- AppSync gradle plugin has conflict with Apollo3 plugin HOT 1
- GraphQL subscription error 403 HOT 1
- Wrong serialisation for Enum type in WebSocketConnectionManager
- AWSAppSyncClient is not generating code from the graphql file in Android HOT 20
- AWS appsync doesn't build with agp version 8.0 HOT 5
- app crashes when retrying all subscriptions HOT 1
- Gradle configuration cache support HOT 2
- Fix critical vulnerability CVE-2022-4725 flagged by Sonarqube on dependency: aws-android-sdk-mobile-client 2.22.1 HOT 2
- Can't import AppSync gradle plugin, classpath issue HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-mobile-appsync-sdk-android.