diff --git a/src/tests/schema.rs b/src/tests/schema.rs index aa5c3a2b..3793cabd 100644 --- a/src/tests/schema.rs +++ b/src/tests/schema.rs @@ -51,6 +51,10 @@ graphql_object!(<'a> &'a Human: Database as "Human" |&self| { Ok(executor.context().get_friends(self.as_character())) } + field appears_in() -> FieldResult<&[Episode]> as "Which movies they appear in" { + Ok(self.appears_in()) + } + field home_planet() -> FieldResult<&Option> as "The home planet of the human" { Ok(self.home_planet()) } @@ -74,6 +78,10 @@ graphql_object!(<'a> &'a Droid: Database as "Droid" |&self| { Ok(executor.context().get_friends(self.as_character())) } + field appears_in() -> FieldResult<&[Episode]> as "Which movies they appear in" { + Ok(self.appears_in()) + } + field primary_function() -> FieldResult<&Option> as "The primary function of the droid" { Ok(self.primary_function()) }