Comments (6)
I am having the same issue here. I followed the updated instructions but still have no success with uploading to S3 automatically through AppSync. I checked to upload the same file URI with TransferUtility and everything works.
from aws-mobile-appsync-sdk-ios.
Hi @end3r117
Thanks for reporting this! I will investigate this issue and post an update here.
Thanks,
Rohan
from aws-mobile-appsync-sdk-ios.
Hi @end3r117
Does your mutation with complex objects have the s3 file at the root level? Currently the SDK checks for the file to be at the root level for the upload to happen.
Have you defined the local schema to use the mutation to use S3ObjectInput
? For example, the .graphql
file in the local iOS dev environment should have a mutation which looks like this:
mutation CreatePost($postInput:PostInput!, $image:S3ObjectInput!){
createPost(postMetadata:$postInput, image:$image){
id
}
}
The decision of whether the mutation is of type graphQLMutationWithS3Object
is made early over here:
https://github.com/awslabs/aws-mobile-appsync-sdk-ios/blob/master/AWSAppSyncClient/AWSAppSyncClient.swift#L470
This record is then persisted and retrieved. If the record is not being classified as graphQLMutationWithS3Object
it is most likely that the input is not in the expected format; which is validated by this method:
Also have you followed the documentation posted here:
https://awslabs.github.io/aws-mobile-appsync-sdk-ios/#complex-objects
The doc above contains step by step info on how to add complex objects to your schema.
Thanks,
Rohan
from aws-mobile-appsync-sdk-ios.
Hey, Rohan. I am out of town for the next week and a half but I will try your suggestions, check file locations, and reply with an update ASAP. Please do not close this issue due to my temporary idleness!
Thanks for the help
from aws-mobile-appsync-sdk-ios.
We also have updated instructions which walk through the schema setup and client code here: https://awslabs.github.io/aws-mobile-appsync-sdk-ios/#complex-objects which you can try. Closing due to lack of activity.
from aws-mobile-appsync-sdk-ios.
Commenting on this old issue to note that this issue is fixed as of release 2.9.0.
from aws-mobile-appsync-sdk-ios.
Related Issues (20)
- Memory leak in AppSyncRealtimeClient HOT 2
- AWSNetworkTransport Error when initializing AWSAppSync in AppDelegateFile SwiftUI - Xcode 13.1 HOT 4
- Add support for Custom Domain Names for AWS AppSync APIs HOT 8
- AWS AppSync SDK with AppSync APIs v2 protocol (pure WebSockets) HOT 1
- AWSAppSyncClient: AWSPerformMutationQueue Crash HOT 2
- Crash: AWSAppSyncClient.sync HOT 5
- Removing pods from source control HOT 2
- AWSMobileClient Crash when app starts HOT 3
- Completion Handler on AWSAppSyncClient.perform called more than once. HOT 1
- Enabling retry for custom scenarios HOT 1
- Update SQLite dependency to match Amplify.DataStore's SQLite version
- Make public constructor for GraphQLError HOT 2
- SPM dependency conflict with Amplify library HOT 6
- Using AWSAppSync with Amplify DataStore HOT 5
- App crashes: AWSAppSync $s10AWSAppSync36AWSCognitoUserPoolsAuthProviderAsyncPAAE09getLatestF5TokenSSyF HOT 1
- SPM dependency resolution failure using aws-mobile-appsync-sdk-ios 3.6.2 and amplify-swift 2.6.0 HOT 2
- AWS subscriptions - subscribe function is not thread safe and causes crashes HOT 1
- Version incompability with other amplify packages HOT 2
- Unknow TCP connection process keep running even when all subscriptions are unsubscribed HOT 1
- How to avoid duplicate mutations when the app is backgrounded/quit before the mutation is finished? 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-ios.