@@ -3,7 +3,9 @@ use serde::ser::SerializeMap;
3
3
use std:: fmt;
4
4
use std:: collections:: HashMap ;
5
5
6
- use :: { GraphQLError , Value , Variables } ;
6
+ use :: { GraphQLError , Value } ;
7
+ #[ cfg( feature="iron-handlers" ) ]
8
+ use :: Variables ;
7
9
use ast:: InputValue ;
8
10
use executor:: ExecutionError ;
9
11
use parser:: { ParseError , Spanning , SourcePosition } ;
@@ -225,6 +227,7 @@ pub struct GraphQlQuery {
225
227
variables : Option < InputValue >
226
228
}
227
229
230
+ #[ cfg( feature="iron-handlers" ) ]
228
231
impl GraphQlQuery {
229
232
230
233
pub fn new ( query : String ,
@@ -260,6 +263,7 @@ impl GraphQlQuery {
260
263
#[ cfg( feature="iron-handlers" ) ]
261
264
pub struct WrappedGraphQLResult < ' a > ( Result < ( Value , Vec < ExecutionError > ) , GraphQLError < ' a > > ) ;
262
265
266
+ #[ cfg( feature="iron-handlers" ) ]
263
267
impl < ' a > WrappedGraphQLResult < ' a > {
264
268
pub fn new ( result : Result < ( Value , Vec < ExecutionError > ) ,
265
269
GraphQLError < ' a > >
@@ -268,6 +272,7 @@ impl<'a> WrappedGraphQLResult<'a> {
268
272
}
269
273
}
270
274
275
+ #[ cfg( feature="iron-handlers" ) ]
271
276
impl < ' a > ser:: Serialize for WrappedGraphQLResult < ' a > {
272
277
fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
273
278
where S : ser:: Serializer ,
0 commit comments