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

"Cannot use 'in' operator to search for 'name' in null" during Amplify Codegen @aws-amplify/cli @12.7.0 #13338

Closed
2 tasks done
ObinnaAka opened this issue Oct 17, 2023 · 4 comments
Labels
codegen Issues related to amplify codegen pending-response Issue is pending response from the issue author pending-triage Issue is pending triage

Comments

@ObinnaAka
Copy link

How did you install the Amplify CLI?

pnpm

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

20.7.0

Amplify CLI Version

12.7.0

What operating system are you using?

Ma

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

No manual changes made

Describe the bug

When running amplify codegen, i get the following output

amplify codegen ✔ Generated GraphQL operations successfully and saved at graphql ✖ Cannot use 'in' operator to search for 'name' in null

When I downgrade to @aws-amplify/[email protected] it works

Expected behavior

✔ Generated GraphQL operations successfully and saved at graphql ✔ Code generated successfully and saved in file api/API.ts

Reproduction steps

Run amplify codegen. I cannot identify if any change to the schema led to this.

Project Identifier

a1fad6e952abc1a3b581c4d3442702d2

Log output

# Put your logs below this line

✖ Cannot use 'in' operator to search for 'name' in null

Additional information

After downgrading to v11.1.1 then upgrading back to 12.7.0 it now works as intended.

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.
@ObinnaAka ObinnaAka added the pending-triage Issue is pending triage label Oct 17, 2023
@ykethan
Copy link
Member

ykethan commented Oct 17, 2023

Hey @ObinnaAka, thank you for reaching out. The issue appears to be similar to aws-amplify/amplify-codegen#734. additionally, a fix has been merged here:aws-amplify/amplify-codegen#738 and should be released in the upcoming updates.

A workaround on the comment aws-amplify/amplify-codegen#734 (comment) seems to mitigate the issue; which suggests adding API.ts as an exclusion in the .graphqlconfig.yml file.

@ykethan ykethan added pending-response Issue is pending response from the issue author codegen Issues related to amplify codegen labels Oct 17, 2023
@jgo80
Copy link

jgo80 commented Oct 20, 2023

Same for me. I fear downgrading to v11 will kill my project. Please fix 12.7 🙏

@ykethan
Copy link
Member

ykethan commented Dec 13, 2023

Closing the issue as the PR has been merged. please feel free in reaching out to us if the issue reoccurs.

@ykethan ykethan closed this as not planned Won't fix, can't repro, duplicate, stale Dec 13, 2023
Copy link

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
codegen Issues related to amplify codegen pending-response Issue is pending response from the issue author pending-triage Issue is pending triage
Projects
None yet
Development

No branches or pull requests

3 participants