@@ -16,7 +16,6 @@ use graph::prelude::{
1616} ;
1717
1818use crate :: introspection:: introspection_schema;
19- use crate :: query:: ext:: ValueExt ;
2019use crate :: query:: { ast as qast, ext:: BlockConstraint } ;
2120use crate :: schema:: ast as sast;
2221use crate :: {
@@ -79,9 +78,7 @@ impl<'a> std::fmt::Display for SelectedFields<'a> {
7978pub struct Query {
8079 /// The schema against which to execute the query
8180 pub schema : Arc < ApiSchema > ,
82- /// The variables for the query, coerced into proper values
83- pub variables : HashMap < String , r:: Value > ,
84- /// The root selection set of the query
81+ /// The root selection set of the query. All variable references have already been resolved
8582 pub selection_set : Arc < q:: SelectionSet > ,
8683 /// The ShapeHash of the original query
8784 pub shape_hash : u64 ,
@@ -179,7 +176,6 @@ impl Query {
179176
180177 let query = Self {
181178 schema : raw_query. schema ,
182- variables : raw_query. variables ,
183179 fragments : raw_query. fragments ,
184180 selection_set : Arc :: new ( raw_query. selection_set ) ,
185181 shape_hash : query. shape_hash ,
@@ -272,7 +268,6 @@ impl Query {
272268
273269 Arc :: new ( Self {
274270 schema : Arc :: new ( introspection_schema) ,
275- variables : self . variables . clone ( ) ,
276271 fragments : self . fragments . clone ( ) ,
277272 selection_set : self . selection_set . clone ( ) ,
278273 shape_hash : self . shape_hash ,
@@ -417,7 +412,7 @@ fn coerce_variable(
417412
418413 let resolver = |name : & str | schema. document ( ) . get_named_type ( name) ;
419414
420- coerce_value ( value, & variable_def. var_type , & resolver, & HashMap :: new ( ) ) . map_err ( |value| {
415+ coerce_value ( value, & variable_def. var_type , & resolver) . map_err ( |value| {
421416 vec ! [ QueryExecutionError :: InvalidArgumentError (
422417 variable_def. position,
423418 variable_def. name. to_owned( ) ,
0 commit comments