Skip to content

fix: unknown scalar not handling variable values #127

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

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

aaron-steinfeld
Copy link
Contributor

@aaron-steinfeld aaron-steinfeld commented Feb 3, 2023

Description

The parseValue version of the unknown scalar was not correctly handling the raw values that are given when using a variable for an unknown value. It treated all inputs as AST objects. It now echos them back out, as unknown values have no specific type and they're left to the code to determine. Also fixed a bug where an error was returned rather than thrown which was hiding this issue in the past.

Testing

Added Unit tests and verified in local instance

Checklist:

  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • Any dependent changes have been merged and published in downstream modules

@aaron-steinfeld aaron-steinfeld requested a review from a team as a code owner February 3, 2023 02:04
@github-actions
Copy link

github-actions bot commented Feb 3, 2023

Test Results

100 tests  +1   100 ✔️ +1   29s ⏱️ -1s
  32 suites ±0       0 💤 ±0 
  32 files   ±0       0 ±0 

Results for commit 7c6d5ef. ± Comparison against base commit 6da79ef.

@codecov
Copy link

codecov bot commented Feb 3, 2023

Codecov Report

Merging #127 (7c6d5ef) into main (6da79ef) will increase coverage by 0.34%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main     #127      +/-   ##
============================================
+ Coverage     57.13%   57.48%   +0.34%     
  Complexity      264      264              
============================================
  Files            90       90              
  Lines          1437     1437              
  Branches         42       42              
============================================
+ Hits            821      826       +5     
+ Misses          587      581       -6     
- Partials         29       30       +1     
Flag Coverage Δ
unit 57.48% <100.00%> (+0.34%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...hql/common/schema/typefunctions/UnknownScalar.java 74.35% <100.00%> (+12.82%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more


@Test
void canConvertFromValue() {
// A dumb bug requires a dumb test
Copy link
Contributor

Choose a reason for hiding this comment

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

lol

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TDD!

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.

2 participants