Got gql "Syntax Error" after amplify pull, cannot compile or push any schema changes or roll back #13751
Closed
2 tasks done
Labels
pending-triage
Issue is pending triage
How did you install the Amplify CLI?
No response
If applicable, what version of Node.js are you using?
No response
Amplify CLI Version
12.11.1
What operating system are you using?
Mac (14.4.1 (23E224)
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No
Describe the bug
During grapql schema (index) update via amplify push, I accidently added "`" at the end of schema.graphql without noticing. Somehow the "`" change got staged into the schema update...??? and got deployed.
At the end of the update, console outputs Syntax Error: Cannot parse the unexpected character "`".
Then I tried to remove the "`", plus various other changes to correct it, but no matter how I try, the schema just won't compile, verified via amplify api gql-compile . e.g via push --iterative-rollback, push --force, etc.
Any help is appreciated.
Expected behavior
The syntax error should be fixable via correction.
Reproduction steps
Project Identifier
Project Identifier: 3785e935e3a1b64d4d113aaf51c7dea5
Log output
⠙ Building resource ...✅ GraphQL schema compiled successfully.
Edit your schema at...
Current Environment: production
┌──────────┬───────────────────────────┬───────────┬───────────────────┐
│ Category │ Resource name │ Operation │ Provider plugin │
├──────────┼───────────────────────────┼───────────┼───────────────────┤
│ Api │ ... │ Update │ awscloudformation │
├──────────┼───────────────────────────┼───────────┼───────────────────┤
│ ──────────────────────┴───────────┴───────────────────┘
✅ GraphQL schema compiled successfully.
...
⠋ Building resource ...✅ GraphQL schema compiled successfully.
...
Deployment completed.
Deployed api ... [ ======================================== ] 18/18
GraphQLAPITransformerSchema3C… AWS::AppSync::GraphQLSchema UPDATE_IN_PROGRESS Wed May 01 2024 09:48:57…
GraphQLAPIDefaultApiKey215A6D… AWS::AppSync::ApiKey UPDATE_IN_PROGRESS Wed May 01 2024 09:48:57…
Deployed (2 of 2)
✔ Generated GraphQL operations successfully and saved at src/graphql
Deployment state saved successfully.
🛑 Syntax Error: Cannot parse the unexpected character "`".
Learn more at: https://docs.amplify.aws/cli/project/troubleshooting/
Session Identifier: d1ebf6fc-ad89-43f0-8080-523b0f378e66
Additional information
No response
Before submitting, please confirm:
The text was updated successfully, but these errors were encountered: