Skip to content

10.6 api gql-compile reports error in schema comments when it finds any of the ')]}' characters #1143

@vgribok

Description

@vgribok

How did you install the Amplify CLI?

npm

If applicable, what version of Node.js are you using?

18.3.0

Amplify CLI Version

10.6

What operating system are you using?

MacOS

Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.

No

Describe the bug

After upgrading CLI from 10.5.x to 10.6 most amplify started complaining on my API graphql schema, reporting errors like "Syntax Error: mismatched brackets found in the schema. Unexpected ]". Other characters it didn't like were ) and }. All of these places were in commented out parts of the schema and had no problem before 10.6.

Expected behavior

Ignore ),],} chars in comments as pre 10.6 cli did.

Reproduction steps

  1. Use amplify 10.6.
  2. Add a comment to the api .graphql file and put one of the ),],} chars to the comment.
  3. Run amplify api gql-compile, see errors.

Project Identifier

No response

Log output

# Put your logs below this line


Additional information

No response

Before submitting, please confirm:

  • I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
  • I have removed any sensitive information from my code snippets and submission.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions