From 1e430b9c11b745da113a22afe909e2c8665d4d99 Mon Sep 17 00:00:00 2001 From: Sunli Date: Tue, 15 Sep 2020 09:31:55 +0800 Subject: [PATCH] Remove InputObjectType and add InputValueType/OutputValueType to docs --- derive/src/input_object.rs | 2 -- src/base.rs | 3 --- src/lib.rs | 4 +--- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/derive/src/input_object.rs b/derive/src/input_object.rs index cc99f8bd..1961a04d 100644 --- a/derive/src/input_object.rs +++ b/derive/src/input_object.rs @@ -166,8 +166,6 @@ pub fn generate(object_args: &args::InputObject, input: &DeriveInput) -> Result< #crate_name::Value::Object(map) } } - - impl #crate_name::InputObjectType for #ident {} }; Ok(expanded.into()) } diff --git a/src/base.rs b/src/base.rs index 7a76ac96..6869487a 100644 --- a/src/base.rs +++ b/src/base.rs @@ -49,9 +49,6 @@ pub trait OutputValueType: Type { ) -> Result; } -/// Represents a GraphQL input object -pub trait InputObjectType: InputValueType {} - /// Represents a GraphQL scalar /// /// You can implement the trait to create a custom scalar. diff --git a/src/lib.rs b/src/lib.rs index 3c44c3d5..0d03c1eb 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -133,7 +133,7 @@ pub use serde_json; pub mod http; -pub use base::{ScalarType, Type}; +pub use base::{InputValueType, OutputValueType, ScalarType, Type}; pub use context::{ Context, ContextBase, Data, QueryEnv, QueryPathNode, QueryPathSegment, Variables, }; @@ -161,8 +161,6 @@ pub use context::ContextSelectionSet; #[doc(hidden)] pub mod registry; #[doc(hidden)] -pub use base::{InputObjectType, InputValueType, OutputValueType}; -#[doc(hidden)] pub use subscription::SubscriptionType; /// Define a GraphQL object with methods