@@ -26,10 +26,12 @@ impl<'a> TypeInfoQueryVisitor<ValidationErrorContext<'a>> for KnownTypeNames {
26
26
. ctx
27
27
. find_schema_definition_by_name ( fragment_type_name. clone ( ) )
28
28
{
29
- _visitor_context. errors . push ( ValidationError {
30
- locations : vec ! [ _node. position] ,
31
- message : format ! ( "Unknown type \" {}\" ." , fragment_type_name) ,
32
- } ) ;
29
+ if !fragment_type_name. starts_with ( "__" ) {
30
+ _visitor_context. errors . push ( ValidationError {
31
+ locations : vec ! [ _node. position] ,
32
+ message : format ! ( "Unknown type \" {}\" ." , fragment_type_name) ,
33
+ } ) ;
34
+ }
33
35
}
34
36
}
35
37
@@ -44,10 +46,12 @@ impl<'a> TypeInfoQueryVisitor<ValidationErrorContext<'a>> for KnownTypeNames {
44
46
. ctx
45
47
. find_schema_definition_by_name ( fragment_type_name. clone ( ) )
46
48
{
47
- _visitor_context. errors . push ( ValidationError {
48
- locations : vec ! [ _node. position] ,
49
- message : format ! ( "Unknown type \" {}\" ." , fragment_type_name) ,
50
- } ) ;
49
+ if !fragment_type_name. starts_with ( "__" ) {
50
+ _visitor_context. errors . push ( ValidationError {
51
+ locations : vec ! [ _node. position] ,
52
+ message : format ! ( "Unknown type \" {}\" ." , fragment_type_name) ,
53
+ } ) ;
54
+ }
51
55
}
52
56
}
53
57
}
@@ -65,10 +69,12 @@ impl<'a> TypeInfoQueryVisitor<ValidationErrorContext<'a>> for KnownTypeNames {
65
69
. ctx
66
70
. find_schema_definition_by_name ( base_type. clone ( ) )
67
71
{
68
- _visitor_context. errors . push ( ValidationError {
69
- locations : vec ! [ _node. position] ,
70
- message : format ! ( "Unknown type \" {}\" ." , base_type) ,
71
- } ) ;
72
+ if !base_type. starts_with ( "__" ) {
73
+ _visitor_context. errors . push ( ValidationError {
74
+ locations : vec ! [ _node. position] ,
75
+ message : format ! ( "Unknown type \" {}\" ." , base_type) ,
76
+ } ) ;
77
+ }
72
78
}
73
79
}
74
80
}
0 commit comments