• Fathy Boundjadj's avatar
    fix(execute-exchange): prune undefined variables (#2435) · a0ca786b
    Fathy Boundjadj authored
    * fix(execute-exchange): prune undefined variables
    
    This allows for directives to correctly validate with variables using default values.
    ```graphql
    query($count: Boolean = false) {
      users {
        # Fails if $count is not provided:
        # Argument "if" of non-null type "Boolean!" must not be null.
        count @include(if: $count)
        list { id name }
      }
    }
    ```
    
    * Add tests and remove unnecessary closure
    
    * Fix test name and ensure it fails if the fix isn't applied
    
    * Revert unnecessary fixture change
    
    * Remove unnecessary mockClear()
    a0ca786b