Fix scalar and some tests under async
there is still some weirdness going on. Running async and non-async tests in `integration_tests/*` works, but running it from `integration_tests` does not.
This commit is contained in:
parent
c42c71b02d
commit
c984457e91
10 changed files with 25 additions and 2 deletions
|
@ -4,6 +4,9 @@ use fnv::FnvHashMap;
|
|||
#[cfg(test)]
|
||||
use juniper::{self, DefaultScalarValue, FromInputValue, GraphQLType, InputValue, ToInputValue};
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
|
||||
#[derive(juniper::GraphQLEnum, Debug, PartialEq)]
|
||||
#[graphql(name = "Some", description = "enum descr")]
|
||||
enum SomeEnum {
|
||||
|
|
|
@ -7,6 +7,9 @@ use juniper::{DefaultScalarValue, GraphQLObject};
|
|||
#[cfg(test)]
|
||||
use juniper::{self, execute, EmptyMutation, GraphQLType, RootNode, Value, Variables};
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
|
||||
#[derive(GraphQLObject, Debug, PartialEq)]
|
||||
#[graphql(
|
||||
name = "MyObj",
|
||||
|
|
|
@ -9,6 +9,9 @@ use juniper::{
|
|||
GraphQLType, RootNode, Value, Variables,
|
||||
};
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
|
||||
pub struct Query;
|
||||
|
||||
#[juniper::graphql_object]
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
|
||||
// Trait.
|
||||
|
||||
#[derive(juniper::GraphQLObject)]
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
use fnv::FnvHashMap;
|
||||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
use juniper::{DefaultScalarValue, FromInputValue, GraphQLType, InputValue, ToInputValue};
|
||||
|
||||
#[derive(juniper::GraphQLScalarValue, PartialEq, Eq, Debug)]
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
extern crate serde_json;
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
|
||||
#[cfg(test)]
|
||||
use juniper::parser::Spanning;
|
||||
#[cfg(test)]
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// Original author of this test is <https://github.com/davidpdrsn>.
|
||||
use juniper::*;
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
|
||||
pub struct Context;
|
||||
|
||||
impl juniper::Context for Context {}
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
// Original author of this test is <https://github.com/davidpdrsn>.
|
||||
use juniper::*;
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
|
||||
struct Query;
|
||||
|
||||
#[juniper::graphql_object]
|
||||
|
|
|
@ -409,8 +409,6 @@ macro_rules! graphql_scalar {
|
|||
}
|
||||
);
|
||||
|
||||
|
||||
#[cfg(feature = "async")]
|
||||
$crate::__juniper_impl_trait!(
|
||||
impl <$($scalar)+> GraphQLTypeAsync for $name
|
||||
where (
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#[cfg(feature = "async")]
|
||||
use futures;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use std::{char, convert::From, marker::PhantomData, ops::Deref, u32};
|
||||
|
||||
|
|
Loading…
Reference in a new issue