Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplify 10.6.1 breaks schema.graphql comment syntax #1170

Closed
2 tasks done
eettaa opened this issue Jan 16, 2023 · 6 comments
Closed
2 tasks done

Amplify 10.6.1 breaks schema.graphql comment syntax #1170

eettaa opened this issue Jan 16, 2023 · 6 comments
Labels
bug Something isn't working duplicate This issue or pull request already exists graphql-transformer-v2 transferred

Comments

@eettaa
Copy link

eettaa commented Jan 16, 2023

How did you install the Amplify CLI?

npm

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

14

Amplify CLI Version

10.6.1

What operating system are you using?

Linux

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

Nope

Describe the bug

Prior to Amplify 10.6.x, schema.graphql comments were allowed to be inline
e.g., this was valid:

  idField: ID! # @index(name: "someIndexName", queryField: "queryFieldName")

... obviously, the comment was ignored/no index was created.

In Amplify 10.6.x, this now causes failures when you run any of the following:
amplify api gql-compile
amplfiy mock api
amplify push

The error is
🛑 Syntax Error: mismatched brackets found in the schema. Unexpected ) at line <number> in the schema.

Expected behavior

Comment semantics are not changed.

Reproduction steps

Create a toy schema
Add in the field I have provided above
Note that gql-compile fails.

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.
@biller-aivy
Copy link

+1

@josefaidt josefaidt transferred this issue from aws-amplify/amplify-cli Jan 17, 2023
@josefaidt
Copy link
Contributor

Hey @eettaa 👋 thanks for raising this! This appears to be a duplicate of #1143, can you confirm whether this accurately describes the issue you're experiencing?

@eettaa
Copy link
Author

eettaa commented Jan 17, 2023

Yes, this is consistent. Sorry for missing the duplicate, apparently my search wasn't thorough enough. I'll keep an eye on that bug

@josefaidt
Copy link
Contributor

Hey no worries @eettaa ! I'll mark this one as a duplicate in favor of tracking the existing item. Please subscribe to #1143 for further updates, however I believe this will be fixed with CLI 10.6.2

@josefaidt josefaidt closed this as not planned Won't fix, can't repro, duplicate, stale Jan 17, 2023
@josefaidt josefaidt added bug Something isn't working duplicate This issue or pull request already exists and removed pending-triage labels Jan 17, 2023
@AnilMaktala
Copy link
Member

Hey @eettaa, Upgrading the CLI version to Amplify CLI v10.6.2 should resolve this issue.

@eettaa
Copy link
Author

eettaa commented Jan 30, 2023

Hi @AnilMaktala thanks for this.
I look forward to upgrading to 10.6.2 one day but am currently stuck at 10.4 because of #1014 ... any chance that could get some attention as well, please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working duplicate This issue or pull request already exists graphql-transformer-v2 transferred
Projects
None yet
Development

No branches or pull requests

4 participants