-
Notifications
You must be signed in to change notification settings - Fork 822
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
feat(graphql-key-transformer): change default to add GSIs when using @key #5648
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5648 +/- ##
==========================================
- Coverage 57.28% 57.26% -0.03%
==========================================
Files 479 479
Lines 21695 21707 +12
Branches 4096 4098 +2
==========================================
+ Hits 12429 12431 +2
- Misses 8405 8415 +10
Partials 861 861
Continue to review full report at Codecov.
|
function getFeatureFlagConfig(projRoot: string) { | ||
const featureFlagPath = path.join(projRoot, 'amplify', 'cli.json'); | ||
return JSON.parse(fs.readFileSync(featureFlagPath, 'utf8')); | ||
} | ||
|
||
function updateFeatureFlagConfig(projRoot: string, config: any) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be cleaner to collapse both of these functions into setFeatureFlag(projRoot: string, feature: string, key: string, value: any)
and it handles reading, updating and writing the cli.json file internally
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should have a set and get for this. In event we need to read from the config to determine what to change it to as opposed to overriding the config.
Also, can you link a docs PR that adds this to the FF section: https://docs.amplify.aws/cli/reference/feature-flags#graphQLTransformer |
421d8d1
to
1b2de33
Compare
This pull request introduces 3 alerts when merging 1b2de33 into 4ce4138 - view on LGTM.com new alerts:
|
dc00a7d
to
b7e6d0d
Compare
Docs PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just a few small comments. Functionality LGTM
packages/graphql-transformers-e2e-tests/src/__tests__/KeyTransformerLocal.e2e.test.ts
Outdated
Show resolved
Hide resolved
packages/graphql-transformers-e2e-tests/src/__tests__/KeyTransformerLocal.e2e.test.ts
Outdated
Show resolved
Hide resolved
this change will ensure that @key will create a GSI instead of an LSI when using a field that is also a partition key re aws-amplify#2702
c7a33fe
to
7ed8c86
Compare
...igration-tests/src/__tests__/migration_tests/transformer_migration/api.key.migration.test.ts
Outdated
Show resolved
Hide resolved
7ed8c86
to
af73cd5
Compare
This pull request has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Description of changes:
Issue #, if available:
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.