apollographql / apollo-rs

Spec compliant GraphQL Tools in Rust.
Apache License 2.0
574 stars 45 forks source link

fix(compiler): identify variables in operation directives #888

Closed goto-bus-stop closed 3 months ago

goto-bus-stop commented 3 months ago

Fixes apollo-compiler rejecting valid queries, where a variable is used inside a directive applied directly to an operation. This is indeed allowed by spec.

Extended existing tests to check directives on fragment definitions as well, because I also found it a little surprising that they allow variables too.