Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix directives preventing scope to "refine" themselves properly
The `Scope.refine` method, which is in charge of ensuring the scope are "minimal" (don't contain unecessary conditions), has a bug whereby if we refine with a directive, we don't minimalize the resulting code properly. This can lead a query plan to include conditions of the form: ``` ... on I { ... on E @foo { v } } ``` where `E` is an implementation of interface `I` (and as such the condition on `I` is redundant). This is harmless in many situations but this can happen in a query to a subgraph that does not know of interface `I`, thus leading to an invalid query. The fix is simply to remove the special casing for directives that leads to not properly minimizing the scope. That condition was an unfortunate left-over of a previous version of the code that wasn't properly updated. Fixes: #801
- Loading branch information