Remove useless code.
This commit is contained in:
parent
9d0b0fcf00
commit
cb2139afcd
|
@ -3,12 +3,10 @@ use crate::registry::{MetaType, Registry};
|
||||||
use crate::resolver_utils::resolve_container;
|
use crate::resolver_utils::resolve_container;
|
||||||
use crate::{
|
use crate::{
|
||||||
CacheControl, ContainerType, Context, ContextSelectionSet, ObjectType, OutputValueType,
|
CacheControl, ContainerType, Context, ContextSelectionSet, ObjectType, OutputValueType,
|
||||||
Positioned, ServerResult, SimpleObject, Subscription, SubscriptionType, Type,
|
Positioned, ServerResult, SimpleObject, Type,
|
||||||
};
|
};
|
||||||
use futures::Stream;
|
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
use std::pin::Pin;
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct MergedObject<A, B>(pub A, pub B);
|
pub struct MergedObject<A, B>(pub A, pub B);
|
||||||
|
@ -94,30 +92,7 @@ where
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<A, B> SubscriptionType for MergedObject<A, B>
|
|
||||||
where
|
|
||||||
A: SubscriptionType + Send + Sync,
|
|
||||||
B: SubscriptionType + Send + Sync,
|
|
||||||
{
|
|
||||||
fn create_field_stream<'a>(
|
|
||||||
&'a self,
|
|
||||||
ctx: &'a Context<'a>,
|
|
||||||
) -> Option<Pin<Box<dyn Stream<Item = ServerResult<serde_json::Value>> + Send + 'a>>> {
|
|
||||||
match self.0.create_field_stream(ctx) {
|
|
||||||
Some(stream) => Some(stream),
|
|
||||||
None => self.1.create_field_stream(ctx),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
#[derive(SimpleObject, Default)]
|
#[derive(SimpleObject, Default)]
|
||||||
#[graphql(internal)]
|
#[graphql(internal)]
|
||||||
pub struct MergedObjectTail;
|
pub struct MergedObjectTail;
|
||||||
|
|
||||||
#[doc(hidden)]
|
|
||||||
#[derive(Default)]
|
|
||||||
pub struct MergedObjectSubscriptionTail;
|
|
||||||
|
|
||||||
#[Subscription(internal)]
|
|
||||||
impl MergedObjectSubscriptionTail {}
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ pub use empty_subscription::EmptySubscription;
|
||||||
pub use id::ID;
|
pub use id::ID;
|
||||||
pub use json::{Json, OutputJson};
|
pub use json::{Json, OutputJson};
|
||||||
pub use maybe_undefined::MaybeUndefined;
|
pub use maybe_undefined::MaybeUndefined;
|
||||||
pub use merged_object::{MergedObject, MergedObjectSubscriptionTail, MergedObjectTail};
|
pub use merged_object::{MergedObject, MergedObjectTail};
|
||||||
#[cfg(feature = "string_number")]
|
#[cfg(feature = "string_number")]
|
||||||
pub use string_number::StringNumber;
|
pub use string_number::StringNumber;
|
||||||
pub use upload::Upload;
|
pub use upload::Upload;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user