Coder Social home page Coder Social logo

Comments (4)

br3nt0n avatar br3nt0n commented on May 20, 2024

Have you tried making the S3Object a top level item? I know according to the docs it's not required to be, but I've had success doing it with something like this:
create(post: Post, imageToUpload: S3ObjectInput)

from aws-mobile-appsync-sdk-ios.

richienko avatar richienko commented on May 20, 2024

As I know, the br3nt0n is right, S3Object has to be in top level item.

For example if you have:
create(post: PostInput)

and PostInput is

type PostInput {
  	id: ID!
  	author: String!
  	title: String
  	file: S3Object
  }

change mutation to:
create(post: PostInput, file: S3ObjectInput)

and PostInput to:

type PostInput {
  	id: ID!
  	author: String!
  	title: String
  }

Reason:
In AppSyncComplexObjectsInterceptor, when deciding if operation should upload S3Object, this condition has to be met:
request.operation.queryDocument().contains("S3ObjectInput")

You can check manually for string "S3ObjectInput" in generated Apollo source file for mutation.
If String object OPERATION_DEFINITION in said mutation source doesn't contain string "S3ObjectInput", interceptor will simply ignore it and will not upload file.

from aws-mobile-appsync-sdk-ios.

palpatim avatar palpatim commented on May 20, 2024

Commenting on this old issue to note that this issue is fixed as of release 2.9.0.

from aws-mobile-appsync-sdk-ios.

mopilo avatar mopilo commented on May 20, 2024

Ah have been experiencing this issue since yesterday and still not solved. using the latest release 3.1.2

from aws-mobile-appsync-sdk-ios.

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.