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

fix: fix modify gql schema base case; scope auth notif to v2 #9689

Merged

Conversation

danielleadams
Copy link
Contributor

@danielleadams danielleadams commented Feb 3, 2022

Description of changes

  • scopes the auth notification to v2 transformer
  • fixes the recursive updates to schema files by using a returned base case rather than setting a variable

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@danielleadams danielleadams requested a review from a team as a code owner February 3, 2022 17:25
@lgtm-com
Copy link

lgtm-com bot commented Feb 3, 2022

This pull request fixes 1 alert when merging 854a71d into 5ff6fe8 - view on LGTM.com

fixed alerts:

  • 1 for Useless conditional

if (stats.isDirectory()) {
await modifyGraphQLSchemaDirectory(fullPath, modified);
} else if (stats.isFile() && !modified) {
if (stats.isDirectory() && (await modifyGraphQLSchemaDirectory(fullPath))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (stats.isDirectory() && (await modifyGraphQLSchemaDirectory(fullPath))) {
if ((await modifyGraphQLSchemaDirectory(fullPath))) {
if(stats.isFile()){
fs.appendFile(fullPath, ' ');
}
return true;
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this will work, this will attempt to read files from a non directory

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah never mind I was thinking about it wrong

Copy link
Contributor

@lazpavel lazpavel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (stats.isDirectory()) {
await modifyGraphQLSchemaDirectory(fullPath, modified);
} else if (stats.isFile() && !modified) {
if (stats.isDirectory() && (await modifyGraphQLSchemaDirectory(fullPath))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure if this will work, this will attempt to read files from a non directory

@ammarkarachi ammarkarachi merged commit 14c56da into aws-amplify:master Feb 3, 2022
@danielleadams danielleadams deleted the da/update-auth-notif branch February 3, 2022 22:36
@github-actions
Copy link

👋 Hi, this pull request was referenced in the v7.6.19 release!

Check out the release notes here https://github.com/aws-amplify/amplify-cli/releases/tag/v7.6.19.

@github-actions github-actions bot added the referenced-in-release Issues referenced in a published release changelog label Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
referenced-in-release Issues referenced in a published release changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants