kensho-technologies / graphql-compiler

Turn complex GraphQL queries into optimized database queries.
Apache License 2.0
550 stars 50 forks source link

Move builtin scalar renaming check to code rather than separate validation step #994

Closed LWprogramming closed 3 years ago

LWprogramming commented 3 years ago

Schema renaming currently has some technical debt where there is a separate validation step before actually attempting to use the renamings to modify the schema. For this to work, it requires us to keep the validation code and the processing code in sync, which we'd like to avoid in favor of attempting to modify the schema directly and gathering errors if something goes wrong.

In this PR, I move a validation step into the code that actually performs the renaming.

codecov[bot] commented 3 years ago

Codecov Report

Merging #994 (08a7bbc) into main (34c968b) will decrease coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #994      +/-   ##
==========================================
- Coverage   94.33%   94.33%   -0.01%     
==========================================
  Files         113      113              
  Lines        9073     9070       -3     
==========================================
- Hits         8559     8556       -3     
  Misses        514      514              
Impacted Files Coverage Δ
...ql_compiler/schema_transformation/rename_schema.py 99.64% <100.00%> (-0.01%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 34c968b...08a7bbc. Read the comment docs.