@@ -117,6 +117,7 @@ pub trait QueryVisitor<T = DefaultVisitorContext> {
117
117
118
118
for ( name, argument) in & field. arguments {
119
119
self . enter_field_argument ( name, argument, field, visitor_context) ;
120
+ self . __visit_value ( argument, visitor_context) ;
120
121
121
122
match argument {
122
123
Value :: Variable ( variable) => {
@@ -171,6 +172,18 @@ pub trait QueryVisitor<T = DefaultVisitorContext> {
171
172
self . leave_selection_set ( _node, visitor_context) ;
172
173
}
173
174
175
+ fn __visit_value ( & self , node : & Value , visitor_context : & mut T ) {
176
+ self . enter_value ( node, visitor_context) ;
177
+
178
+ if let Value :: Object ( tree_map) = node {
179
+ tree_map
180
+ . iter ( )
181
+ . for_each ( |( _key, sub_value) | self . __visit_value ( sub_value, visitor_context) )
182
+ }
183
+
184
+ self . leave_value ( node, visitor_context) ;
185
+ }
186
+
174
187
fn enter_document ( & self , _node : & Document , _visitor_context : & mut T ) { }
175
188
fn leave_document ( & self , _node : & Document , _visitor_context : & mut T ) { }
176
189
@@ -210,6 +223,9 @@ pub trait QueryVisitor<T = DefaultVisitorContext> {
210
223
) {
211
224
}
212
225
226
+ fn enter_value ( & self , _node : & Value , _visitor_context : & mut T ) { }
227
+ fn leave_value ( & self , _node : & Value , _visitor_context : & mut T ) { }
228
+
213
229
fn enter_selection ( & self , _node : & Selection , _visitor_context : & mut T ) { }
214
230
fn leave_selection ( & self , _node : & Selection , _visitor_context : & mut T ) { }
215
231
0 commit comments