Move executor to its own library
This commit is contained in:
parent
2be6f7416e
commit
3b6c69ca1e
12 changed files with 14 additions and 14 deletions
|
@ -183,6 +183,7 @@ mod value;
|
|||
mod types;
|
||||
mod schema;
|
||||
pub mod validation;
|
||||
mod executor;
|
||||
mod integrations;
|
||||
|
||||
#[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 parser::{parse_document_source, ParseError, Spanning, SourcePosition};
|
||||
use types::execute_validated_query;
|
||||
use validation::{RuleError, ValidatorContext, visit_all_rules};
|
||||
|
||||
pub use ast::{ToInputValue, FromInputValue, InputValue, Type, Selection};
|
||||
pub use value::Value;
|
||||
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 schema::model::RootNode;
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ use std::marker::PhantomData;
|
|||
use std::fmt;
|
||||
|
||||
use types::base::{GraphQLType};
|
||||
use types::schema::Registry;
|
||||
use executor::Registry;
|
||||
use ast::Type;
|
||||
use schema::meta::{MetaType, ObjectMeta, PlaceholderMeta, UnionMeta, InterfaceMeta, Argument};
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use rustc_serialize::json::ToJson;
|
||||
|
||||
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,
|
||||
Field, Argument, EnumValue};
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
use types::schema::FieldResult;
|
||||
use executor::FieldResult;
|
||||
use tests::model::{Character, Human, Droid, Database, Episode};
|
||||
|
||||
graphql_enum!(Episode {
|
||||
|
|
|
@ -4,7 +4,7 @@ use ast::{InputValue, Selection, Directive, FromInputValue};
|
|||
use value::Value;
|
||||
|
||||
use schema::meta::{Argument, MetaType};
|
||||
use types::schema::{Executor, Registry, ExecutionResult};
|
||||
use executor::{Executor, Registry, ExecutionResult};
|
||||
use parser::Spanning;
|
||||
|
||||
/// GraphQL type kind
|
||||
|
|
|
@ -2,7 +2,7 @@ use ast::{InputValue, ToInputValue, FromInputValue, Selection};
|
|||
use value::Value;
|
||||
use schema::meta::MetaType;
|
||||
|
||||
use types::schema::{Executor, Registry};
|
||||
use executor::{Executor, Registry};
|
||||
use types::base::{GraphQLType};
|
||||
|
||||
impl<T, CtxT> GraphQLType<CtxT> for Option<T> where T: GraphQLType<CtxT> {
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
pub mod base;
|
||||
pub mod schema;
|
||||
pub mod scalars;
|
||||
pub mod pointers;
|
||||
pub mod containers;
|
||||
pub mod utilities;
|
||||
|
||||
pub use self::schema::execute_validated_query;
|
||||
|
|
|
@ -2,7 +2,7 @@ use ast::{Selection, InputValue, ToInputValue, FromInputValue};
|
|||
use value::Value;
|
||||
|
||||
use schema::meta::MetaType;
|
||||
use types::schema::{Executor, Registry, ExecutionResult};
|
||||
use executor::{Executor, Registry, ExecutionResult};
|
||||
use types::base::{Arguments, GraphQLType};
|
||||
|
||||
impl<T, CtxT> GraphQLType<CtxT> for Box<T> where T: GraphQLType<CtxT> {
|
||||
|
|
|
@ -3,7 +3,7 @@ use value::Value;
|
|||
|
||||
use schema::meta::MetaType;
|
||||
|
||||
use types::schema::{Executor, Registry};
|
||||
use executor::{Executor, Registry};
|
||||
use types::base::GraphQLType;
|
||||
|
||||
/// An ID as defined by the GraphQL specification
|
||||
|
|
|
@ -642,7 +642,7 @@ mod tests {
|
|||
use super::ConflictReasonMessage::*;
|
||||
|
||||
use types::base::GraphQLType;
|
||||
use types::schema::Registry;
|
||||
use executor::Registry;
|
||||
use types::scalars::ID;
|
||||
use schema::meta::MetaType;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use parser::parse_document_source;
|
||||
use ast::{FromInputValue, InputValue};
|
||||
use types::base::GraphQLType;
|
||||
use types::schema::Registry;
|
||||
use executor::Registry;
|
||||
use types::scalars::ID;
|
||||
use schema::model::{DirectiveType, DirectiveLocation, RootNode};
|
||||
use schema::meta::{EnumValue, MetaType};
|
||||
|
|
Loading…
Reference in a new issue