Upload serialization unsupported When using AWS S3 when add schema.graphql in config setup

Hi everyone, I’m a newbie of Parse server :sob: and I have one trouble.My project is using Graphql, parse server and parse server cloud code. Im using AWS S3 to upload Images by using filesAdapter with module @parse/s3-files-adapter and it work perfect. But My project using some custom mutation so I need to add custom file Schema.graphql like this in config file of parse server.
Code like this: “graphQLSchema”: “./schema.graphql”.
Cuz I can just upload 1 image :joy:
Then I test to using Mutation upload file it don’t work like usual and it show the error like this.(BTW I’m using FireCamp, it’s a tool to help me write graphql code easier) :joy: Thanks guys, please help me. (My English quite bad :joy:)

If you guys have any solusions please let me know. thanks

Could you share your schema.graphql and your cloud code to resolve the schema?

1 Like

yes this is my code of schema

Type declare

type SendVerificationCodePayload {
clientMutationId: String
status: Int!
messages: String!
}
type ConfirmVerificationCodePayload {
clientMutationId: String
status: Int!
messages: String!
data: User!
}
type User {
objectId: String!
phoneNumber: String!
}

type checkrCandidatesPayload {
messages: String!
}

Input declare

input sendVerificationCodeInput {
“Phone Number”
phoneNumber: String!
clientMutationId: String
}
input confirmVerificationCodeInput {
“Phone Number”
phoneNumber: String!
“Verify Code”
verifyCode: String!
clientMutationId: String!
}
input checkrCandidatesInput {
first_name: String!
last_name: String!
email: String!
phone: String!
}
extend type Mutation {
“Send Verify code to login or register”
createSendVerificationCode(
input: sendVerificationCodeInput
): SendVerificationCodePayload @resolve(to: “sendVerificationCode”)
“Send Verify code to login or register”
createConfirmVerificationCode(
input: confirmVerificationCodeInput
): ConfirmVerificationCodePayload @resolve(to: “confirmVerificationCode”)
createCheckrCandidates(input: checkrCandidatesInput): checkrCandidatesPayload
@resolve(to: “checkrCandidates”)
}

it link to the function cloud code everything is work perfect i can do all the function with graphql but i can not upload image

this is my config file of parse server as you can see im using @parse/s3-files-adapter" so when i upload the file the file will go to aws s3 server. If I remove “graphQLSchema”: “./schema.graphql” line it upload perfect but the cloud code can not using by graphql :sob:

{
“appName”: “”,
“appId”: “asdf”,
“cloud”: “./cloud/main.js”,
“databaseURI”: “mongodb://127.0.0.1:27017/parse”,
“jsonLogs”: true,
“masterKey”: “asdf”,
“mountGraphQL”: true,
“mountPlayground”: true,
“graphQLSchema”: “./schema.graphql”,
“port”: 1337,
“startLiveQueryServer”: true,
“verifyUserEmails”: false,
“graphQLPath”: “/graphql”,
“mountPath”: “/”,
“maxUploadSize”: “50mb”,
“playgroundPath”: “/playground”,
“filesAdapter”: {
“module”: “@parse/s3-files-adapter”,
“options”: {
“bucket”: “”,
“region”: “”,
“bucketPrefix”: “”,
“directAccess”: false,
“fileAcl”: null,
“baseUrl”: null,
“baseUrlDirect”: false,
“signatureVersion”: “v4”,
“globalCacheControl”: “public, max-age=86400”,
“ServerSideEncryption”: “AES256|aws:kms”,
“validateFilename”: null,
“generateKey”: null
}
}
}

That’s strange. It should work but maybe there is some problem with the upload file handler when merging the schema. Would you mind to write a failing test case in the open source repo? In the meantime, I believe the easiest way for you is to upload through the REST api.

yup for sure! Oh and can I downgrade the version and using it?

You don’t need to downgrade. Both REST and GraphQL are available on your Parse Server. Since your mount path is / the REST API is mounted on the root of your server address.

Oh thanks a lot :heart: