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: correct behavior for CreateApiKey config #463

Merged
merged 1 commit into from
May 23, 2022

Conversation

alharris-at
Copy link
Contributor

@alharris-at alharris-at commented May 19, 2022

Description of changes

Update the behavior where we look at the old CreateAPIKey flag from transformer v1. We had implemented this in v1 to just look for truthy behavior, which isn't consistent with the previous implementation. Explicitly updating this to only disable for value 0.

Issue #, if available

#80

Description of how you validated changes

Ran in my local CLI to verify the 0/1 behavior a few times, and added unit tests for this behavior to ensure we have consistency in how we're handling these parameters.

Checklist

  • PR description included
  • yarn test passes
  • Tests are changed or added
  • Relevant documentation is changed or added (and PR referenced)

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

@alharris-at alharris-at marked this pull request as ready for review May 19, 2022 19:42
@alharris-at alharris-at requested a review from a team May 19, 2022 19:42
@alharris-at alharris-at requested a review from a team as a code owner May 19, 2022 19:42
@codecov-commenter
Copy link

Codecov Report

Merging #463 (aca0fbd) into main (91cdb38) will decrease coverage by 5.83%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #463      +/-   ##
==========================================
- Coverage   72.08%   66.24%   -5.84%     
==========================================
  Files         208      228      +20     
  Lines       13471    14999    +1528     
  Branches     3200     3675     +475     
==========================================
+ Hits         9710     9936     +226     
- Misses       3454     4624    +1170     
- Partials      307      439     +132     
Impacted Files Coverage Δ
...l-transformer-core/src/transformation/transform.ts 16.62% <100.00%> (ø)
...aphql-transformer-core/src/utils/type-map-utils.ts 12.50% <0.00%> (ø)
...y-graphql-transformer-core/src/cdk-compat/index.ts 100.00% <0.00%> (ø)
...sformer-core/src/transformer-context/datasource.ts 6.25% <0.00%> (ø)
...raphql-transformer-core/src/utils/defaultSchema.ts 100.00% <0.00%> (ø)
...ql-transformer-core/src/cdk-compat/nested-stack.ts 10.20% <0.00%> (ø)
...-transformer-core/src/transformation/sync-utils.ts 20.00% <0.00%> (ø)
...transformer-core/src/transformer-context/output.ts 2.78% <0.00%> (ø)
...hql-transformer-core/src/utils/strip-directives.ts 3.38% <0.00%> (ø)
...-core/src/transformer-context/noop-feature-flag.ts 7.69% <0.00%> (ø)
... and 15 more

📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more

Copy link
Contributor

@marcvberg marcvberg left a comment

Choose a reason for hiding this comment

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

LGTM, only thing is looking at the old implementation conditional should we add a test or two for literal true/false values?

Copy link
Contributor

@AaronZyLee AaronZyLee left a comment

Choose a reason for hiding this comment

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

LGTM 🍨

@alharris-at alharris-at merged commit 26ac8b3 into main May 23, 2022
@alharris-at alharris-at deleted the create-api-key-config-fix branch May 23, 2022 18:02
@alharris-at alharris-at mentioned this pull request Jun 4, 2022
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants