-
Notifications
You must be signed in to change notification settings - Fork 202
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question: AWS Amplify Graphql S3 Integration #799
Comments
Hi @obrian33 Can you please provide the code snippet that you are trying. It would be great if you can provide the following details to help us debug the issue: To Reproduce
Expected behavior Screenshots Environment(please complete the following information):
Device Information (please complete the following information):
Additional context |
In case of iOS uploading data to S3 is supported for iOS Appsync SDK, please find the documentation here under But iOS Amplify API category doesnot support complex objects currently. |
Thanks for the response! Here is the additional info requested: To Reproduce: Create a Amazon S3 bucket to hold files via amplify add storage. Create a user pool in Amazon Cognito User Pools via amplify add auth. Create a GraphQL API via amplify add api and add the following type definition: type S3Object { type Picture @model @auth(rules: [{allow: owner}]) { Run this mutation with S3 objects from your client app: mutation ($input: CreatePictureInput!) { Expected Behavior: Environment:
Device Information:
|
@royjit Your latest comment seems to address my main concern because I am not using the AWS Mobile SDK but strictly the iOS Amplify API. My current workaround is to run a graphql mutation and then use the Amplify.Storage.uploadData function to upload and then the Amplify.Storage.downloadData function during queries to retrieve the complex objects from S3, is there any plans to include complex object support for Amplify.API? |
Yes, you are right that would be the current approach. We will take this as a feature request and will update here when we have more info. |
Thanks! Excited to see what comes next :) |
related issue on the SDK / AppSync SDK aws-amplify/aws-sdk-ios#1740 |
@royjit Any updates on using complex objects with Amplify? |
We currently do not support performing both the S3 upload and mutation request through one API call, aka "complex objects" support in the SDK. Please see "working with files" documentation for more details. Draft in aws-amplify/docs#5649 Please track #537 for Complex Object support |
Reading through the documentation I see this line:
"The GraphQL Transform handles creating the relevant input types and will store pointers to S3 objects in Amazon DynamoDB. The AppSync SDKs and Amplify library handle uploading the files to S3 transparently."
From what I understand, this means by running a graphql request with the described S3Object definition I should be able to do a mutation and by running that mutation upload the data to S3. However, that doesn't happen. I'm curious to know if this functionality exists and how to do it or if I am misinterpreting what's being said, thanks!
https://docs.amplify.aws/cli/graphql-transformer/storage#basics
The text was updated successfully, but these errors were encountered: