@@ -9,9 +9,9 @@ use crate::{ast::QueryVisitor, validation::utils::ValidationContext};
9
9
/// to fragments defined in the same document.
10
10
///
11
11
/// See https://spec.graphql.org/draft/#sec-Fragment-spread-target-defined
12
- pub struct KnownFragmentNamesRule ;
12
+ pub struct KnownFragmentNames ;
13
13
14
- impl < ' a > QueryVisitor < ValidationErrorContext < ' a > > for KnownFragmentNamesRule {
14
+ impl < ' a > QueryVisitor < ValidationErrorContext < ' a > > for KnownFragmentNames {
15
15
fn enter_fragment_spread (
16
16
& self ,
17
17
_node : & FragmentSpread ,
@@ -29,7 +29,7 @@ impl<'a> QueryVisitor<ValidationErrorContext<'a>> for KnownFragmentNamesRule {
29
29
}
30
30
}
31
31
32
- impl ValidationRule for KnownFragmentNamesRule {
32
+ impl ValidationRule for KnownFragmentNames {
33
33
fn validate < ' a > ( & self , ctx : & ValidationContext ) -> Vec < ValidationError > {
34
34
let mut error_context = ValidationErrorContext :: new ( ctx) ;
35
35
self . visit_document ( & ctx. operation . clone ( ) , & mut error_context) ;
@@ -42,7 +42,7 @@ impl ValidationRule for KnownFragmentNamesRule {
42
42
fn valid_fragment ( ) {
43
43
use crate :: validation:: test_utils:: * ;
44
44
45
- let mut plan = create_plan_from_rule ( Box :: new ( KnownFragmentNamesRule { } ) ) ;
45
+ let mut plan = create_plan_from_rule ( Box :: new ( KnownFragmentNames { } ) ) ;
46
46
let errors = test_operation_without_schema (
47
47
"{
48
48
human(id: 4) {
@@ -75,7 +75,7 @@ fn valid_fragment() {
75
75
fn invalid_fragment ( ) {
76
76
use crate :: validation:: test_utils:: * ;
77
77
78
- let mut plan = create_plan_from_rule ( Box :: new ( KnownFragmentNamesRule { } ) ) ;
78
+ let mut plan = create_plan_from_rule ( Box :: new ( KnownFragmentNames { } ) ) ;
79
79
let errors = test_operation_without_schema (
80
80
"{
81
81
human(id: 4) {
0 commit comments