appsync-with-postgraphile-rds icon indicating copy to clipboard operation
appsync-with-postgraphile-rds copied to clipboard

AppSync Start Schema Creation Failed with response details: The schema is being processed

Open pelim95 opened this issue 3 years ago • 6 comments

Hi, I am trying your example to connect to my PostgreSQL which hosted on docker. However I encounter below error when I was trying to run the provider lambda function. At below pieces of code:

await appsyncClient.startSchemaCreation({ apiId, definition }).promise()
let response = await appsyncClient.getSchemaCreationStatus({ apiId }).promise()
while (response.status !== 'SUCCESS') {
            console.log(`Schema Creation Status: ${response.status}`)

            if (response.status === 'FAILED') {
                console.log(`Schema creation failed: ${response.details}`)
            }

            await new Promise((r) => setTimeout(r, 250))
            response.status = (await appsyncClient.getSchemaCreationStatus({ apiId }).promise()).status
}

It returns status FAILED with response of: The schema is being processed. May I know how to resolve this?

Thank you so much for this repo!

pelim95 avatar Sep 01 '22 05:09 pelim95

doesnt seem like you're using latest. can you pull the latest version of the repo and try again?

onlybakam avatar Sep 05 '22 23:09 onlybakam

Hey @onlybakam , I am experiencing this with the latest version at the same place... any ideas to resolve or add more logging to understand the problem better?

2023-02-09T10:21:41.495Z 378df5d2-59b2-416c-a93d-59707ece36c9 INFO errors during schema creation: Error: The schema is being processed. at updateAppSyncAPI (/var/task/index.js:349:15) at processTicksAndRejections (internal/process/task_queues.js:95:5) at async Promise.all (index 1) at async Runtime.handler (/var/task/index.js:262:5)

palabadi avatar Feb 09 '23 10:02 palabadi

I've also ran into this issue, with the latest code version. @onlybakam Do you have any advice on how to work around?

image

bbricher avatar Feb 23 '23 20:02 bbricher

So I put in some extra logging and found that several mutations weren't created at time of resolver creation and that was what was throwing the error, the logging in the provider lambda needs to be updated so that it doesn't just spit out the same response details from the first run, the response isn't being updated with each call so the details don't reflect the most recent call's details

bbricher avatar Feb 23 '23 21:02 bbricher

@bbricher will look into this

onlybakam avatar Feb 28 '23 01:02 onlybakam

What happened with this? I'm still experiencing this error.

pabgn avatar Apr 29 '24 11:04 pabgn