Move executor to its own library

This commit is contained in:
Magnus Hallin 2016-09-18 20:59:38 +02:00
parent 2be6f7416e
commit 3b6c69ca1e
12 changed files with 14 additions and 14 deletions

View file

@ -183,6 +183,7 @@ mod value;
mod types; mod types;
mod schema; mod schema;
pub mod validation; pub mod validation;
mod executor;
mod integrations; mod integrations;
#[cfg(all(test, not(feature="expose-test-schema")))] mod tests; #[cfg(all(test, not(feature="expose-test-schema")))] mod tests;
@ -193,13 +194,15 @@ use std::collections::HashMap;
use rustc_serialize::json::{ToJson, Json}; use rustc_serialize::json::{ToJson, Json};
use parser::{parse_document_source, ParseError, Spanning, SourcePosition}; use parser::{parse_document_source, ParseError, Spanning, SourcePosition};
use types::execute_validated_query;
use validation::{RuleError, ValidatorContext, visit_all_rules}; use validation::{RuleError, ValidatorContext, visit_all_rules};
pub use ast::{ToInputValue, FromInputValue, InputValue, Type, Selection}; pub use ast::{ToInputValue, FromInputValue, InputValue, Type, Selection};
pub use value::Value; pub use value::Value;
pub use types::base::{Arguments, GraphQLType, TypeKind}; pub use types::base::{Arguments, GraphQLType, TypeKind};
pub use types::schema::{Executor, Registry, ExecutionResult, ExecutionError, FieldResult}; pub use executor::{
Executor, Registry, ExecutionResult, ExecutionError, FieldResult,
execute_validated_query,
};
pub use types::scalars::ID; pub use types::scalars::ID;
pub use schema::model::RootNode; pub use schema::model::RootNode;

View file

@ -3,7 +3,7 @@ use std::marker::PhantomData;
use std::fmt; use std::fmt;
use types::base::{GraphQLType}; use types::base::{GraphQLType};
use types::schema::Registry; use executor::Registry;
use ast::Type; use ast::Type;
use schema::meta::{MetaType, ObjectMeta, PlaceholderMeta, UnionMeta, InterfaceMeta, Argument}; use schema::meta::{MetaType, ObjectMeta, PlaceholderMeta, UnionMeta, InterfaceMeta, Argument};

View file

@ -1,7 +1,7 @@
use rustc_serialize::json::ToJson; use rustc_serialize::json::ToJson;
use types::base::{GraphQLType, Arguments, TypeKind}; use types::base::{GraphQLType, Arguments, TypeKind};
use types::schema::{Executor, Registry, FieldResult, ExecutionResult}; use executor::{Executor, Registry, FieldResult, ExecutionResult};
use schema::meta::{MetaType, ObjectMeta, EnumMeta, InputObjectMeta, UnionMeta, InterfaceMeta, use schema::meta::{MetaType, ObjectMeta, EnumMeta, InputObjectMeta, UnionMeta, InterfaceMeta,
Field, Argument, EnumValue}; Field, Argument, EnumValue};

View file

@ -1,4 +1,4 @@
use types::schema::FieldResult; use executor::FieldResult;
use tests::model::{Character, Human, Droid, Database, Episode}; use tests::model::{Character, Human, Droid, Database, Episode};
graphql_enum!(Episode { graphql_enum!(Episode {

View file

@ -4,7 +4,7 @@ use ast::{InputValue, Selection, Directive, FromInputValue};
use value::Value; use value::Value;
use schema::meta::{Argument, MetaType}; use schema::meta::{Argument, MetaType};
use types::schema::{Executor, Registry, ExecutionResult}; use executor::{Executor, Registry, ExecutionResult};
use parser::Spanning; use parser::Spanning;
/// GraphQL type kind /// GraphQL type kind

View file

@ -2,7 +2,7 @@ use ast::{InputValue, ToInputValue, FromInputValue, Selection};
use value::Value; use value::Value;
use schema::meta::MetaType; use schema::meta::MetaType;
use types::schema::{Executor, Registry}; use executor::{Executor, Registry};
use types::base::{GraphQLType}; use types::base::{GraphQLType};
impl<T, CtxT> GraphQLType<CtxT> for Option<T> where T: GraphQLType<CtxT> { impl<T, CtxT> GraphQLType<CtxT> for Option<T> where T: GraphQLType<CtxT> {

View file

@ -1,8 +1,5 @@
pub mod base; pub mod base;
pub mod schema;
pub mod scalars; pub mod scalars;
pub mod pointers; pub mod pointers;
pub mod containers; pub mod containers;
pub mod utilities; pub mod utilities;
pub use self::schema::execute_validated_query;

View file

@ -2,7 +2,7 @@ use ast::{Selection, InputValue, ToInputValue, FromInputValue};
use value::Value; use value::Value;
use schema::meta::MetaType; use schema::meta::MetaType;
use types::schema::{Executor, Registry, ExecutionResult}; use executor::{Executor, Registry, ExecutionResult};
use types::base::{Arguments, GraphQLType}; use types::base::{Arguments, GraphQLType};
impl<T, CtxT> GraphQLType<CtxT> for Box<T> where T: GraphQLType<CtxT> { impl<T, CtxT> GraphQLType<CtxT> for Box<T> where T: GraphQLType<CtxT> {

View file

@ -3,7 +3,7 @@ use value::Value;
use schema::meta::MetaType; use schema::meta::MetaType;
use types::schema::{Executor, Registry}; use executor::{Executor, Registry};
use types::base::GraphQLType; use types::base::GraphQLType;
/// An ID as defined by the GraphQL specification /// An ID as defined by the GraphQL specification

View file

@ -642,7 +642,7 @@ mod tests {
use super::ConflictReasonMessage::*; use super::ConflictReasonMessage::*;
use types::base::GraphQLType; use types::base::GraphQLType;
use types::schema::Registry; use executor::Registry;
use types::scalars::ID; use types::scalars::ID;
use schema::meta::MetaType; use schema::meta::MetaType;

View file

@ -1,7 +1,7 @@
use parser::parse_document_source; use parser::parse_document_source;
use ast::{FromInputValue, InputValue}; use ast::{FromInputValue, InputValue};
use types::base::GraphQLType; use types::base::GraphQLType;
use types::schema::Registry; use executor::Registry;
use types::scalars::ID; use types::scalars::ID;
use schema::model::{DirectiveType, DirectiveLocation, RootNode}; use schema::model::{DirectiveType, DirectiveLocation, RootNode};
use schema::meta::{EnumValue, MetaType}; use schema::meta::{EnumValue, MetaType};