Update model.rs
This commit is contained in:
parent
426d7923dc
commit
a09fd09cb1
|
@ -87,9 +87,6 @@ impl Droid {
|
||||||
|
|
||||||
pub struct QueryRoot;
|
pub struct QueryRoot;
|
||||||
|
|
||||||
#[async_graphql::Union]
|
|
||||||
struct HumanDroid(Human, Droid);
|
|
||||||
|
|
||||||
#[async_graphql::Object]
|
#[async_graphql::Object]
|
||||||
impl QueryRoot {
|
impl QueryRoot {
|
||||||
#[field]
|
#[field]
|
||||||
|
@ -108,11 +105,6 @@ impl QueryRoot {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[field]
|
|
||||||
async fn test(&self, ctx: &Context<'_>) -> HumanDroid {
|
|
||||||
Human(ctx.data::<StarWars>().luke).into()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[field]
|
#[field]
|
||||||
async fn human(
|
async fn human(
|
||||||
&self,
|
&self,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user