Update merged_object.rs
This commit is contained in:
parent
b7b9abf40d
commit
0ed444654d
|
@ -9,7 +9,6 @@ use crate::{
|
||||||
CacheControl, ContainerType, Context, ContextSelectionSet, ObjectType, OutputType, Positioned,
|
CacheControl, ContainerType, Context, ContextSelectionSet, ObjectType, OutputType, Positioned,
|
||||||
ServerResult, SimpleObject, Type, Value,
|
ServerResult, SimpleObject, Type, Value,
|
||||||
};
|
};
|
||||||
use async_graphql_value::ConstValue;
|
|
||||||
|
|
||||||
#[doc(hidden)]
|
#[doc(hidden)]
|
||||||
pub struct MergedObject<A, B>(pub A, pub B);
|
pub struct MergedObject<A, B>(pub A, pub B);
|
||||||
|
@ -71,11 +70,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async fn find_entity(
|
async fn find_entity(&self, ctx: &Context<'_>, params: &Value) -> ServerResult<Option<Value>> {
|
||||||
&self,
|
|
||||||
ctx: &Context<'_>,
|
|
||||||
params: &ConstValue,
|
|
||||||
) -> ServerResult<Option<ConstValue>> {
|
|
||||||
match self.0.find_entity(ctx, params).await {
|
match self.0.find_entity(ctx, params).await {
|
||||||
Ok(Some(value)) => Ok(Some(value)),
|
Ok(Some(value)) => Ok(Some(value)),
|
||||||
Ok(None) => self.1.find_entity(ctx, params).await,
|
Ok(None) => self.1.find_entity(ctx, params).await,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user