@@ -18,7 +18,6 @@ use graph::data::schema::ApiSchema;
1818use graph:: prelude:: { info, o, q, r, s, BlockNumber , CheapClone , Logger , TryFromValue } ;
1919
2020use crate :: introspection:: introspection_schema;
21- use crate :: query:: ext:: ValueExt ;
2221use crate :: query:: { ast as qast, ext:: BlockConstraint } ;
2322use crate :: schema:: ast as sast;
2423use crate :: {
@@ -116,9 +115,7 @@ impl<'a> std::fmt::Display for SelectedFields<'a> {
116115pub struct Query {
117116 /// The schema against which to execute the query
118117 pub schema : Arc < ApiSchema > ,
119- /// The variables for the query, coerced into proper values
120- pub variables : HashMap < String , r:: Value > ,
121- /// The root selection set of the query
118+ /// The root selection set of the query. All variable references have already been resolved
122119 pub selection_set : Arc < q:: SelectionSet > ,
123120 /// The ShapeHash of the original query
124121 pub shape_hash : u64 ,
@@ -231,7 +228,6 @@ impl Query {
231228
232229 let query = Self {
233230 schema : raw_query. schema ,
234- variables : raw_query. variables ,
235231 fragments : raw_query. fragments ,
236232 selection_set : Arc :: new ( raw_query. selection_set ) ,
237233 shape_hash : query. shape_hash ,
@@ -324,7 +320,6 @@ impl Query {
324320
325321 Arc :: new ( Self {
326322 schema : Arc :: new ( introspection_schema) ,
327- variables : self . variables . clone ( ) ,
328323 fragments : self . fragments . clone ( ) ,
329324 selection_set : self . selection_set . clone ( ) ,
330325 shape_hash : self . shape_hash ,
@@ -469,7 +464,7 @@ fn coerce_variable(
469464
470465 let resolver = |name : & str | schema. document ( ) . get_named_type ( name) ;
471466
472- coerce_value ( value, & variable_def. var_type , & resolver, & HashMap :: new ( ) ) . map_err ( |value| {
467+ coerce_value ( value, & variable_def. var_type , & resolver) . map_err ( |value| {
473468 vec ! [ QueryExecutionError :: InvalidArgumentError (
474469 variable_def. position,
475470 variable_def. name. to_owned( ) ,
0 commit comments