kensho-technologies / graphql-compiler

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

Fix bug involving cascading suppression error #992

Closed LWprogramming closed 3 years ago

LWprogramming commented 3 years ago

Suppose a GraphQL schema contains the following types:

type Human  {
  name: String
  pet: Dog
}

type Dog {
  id: String
}

It would be illegal to suppress the type Dog because the type Human still has a field pet of type Dog, but if the field pet was also suppressed, this would be a legal schema transformation. Previously, the code would incorrectly raise a CascadingSuppressionError regardless of whether or not pet was suppressed-- this PR fixes that bug.

LWprogramming commented 3 years ago

Something seems to have gone wrong with the pull request (frozen tests, no webhooks working etc) while creating it so I'm going to close and re-open to see if that fixes it

codecov[bot] commented 3 years ago

Codecov Report

Merging #992 (dc36f0a) into main (33cc5e8) will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #992   +/-   ##
=======================================
  Coverage   94.36%   94.36%           
=======================================
  Files         113      113           
  Lines        9065     9067    +2     
=======================================
+ Hits         8554     8556    +2     
  Misses        511      511           
Impacted Files Coverage Δ
...ql_compiler/schema_transformation/rename_schema.py 99.65% <100.00%> (+<0.01%) :arrow_up:

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 33cc5e8...dc36f0a. Read the comment docs.