Skip to content

Commit

Permalink
Remove interfaces
Browse files Browse the repository at this point in the history
This can come back when  graphql-rust#605
exists.
  • Loading branch information
LegNeato committed Jun 5, 2020
1 parent b73cb89 commit 5835557
Showing 1 changed file with 5 additions and 23 deletions.
28 changes: 5 additions & 23 deletions juniper/src/schema/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ mod test {
use crate as juniper;
use crate::{
EmptyMutation, EmptySubscription, GraphQLEnum, GraphQLInputObject, GraphQLObject,
GraphQLUnion,
GraphQLUnionInternal as GraphQLUnion,
};

#[test]
Expand All @@ -612,17 +612,6 @@ mod test {
struct IceCream {
cold: bool,
};
enum Sweet {
Cake(Cake),
IceCream(IceCream),
}
juniper::graphql_interface!(Sweet: () where Scalar = <S> |&self| {
field is_brownie() -> bool { false }
instance_resolvers: |_| {
&Cake => match *self { Sweet::Cake(ref x) => Some(x), _ => None },
&IceCream => match *self { Sweet::IceCream(ref x) => Some(x), _ => None },
}
});
#[derive(GraphQLUnion)]
enum GlutenFree {
Cake(Cake),
Expand All @@ -648,16 +637,13 @@ mod test {
fn whatever() -> String {
"foo".to_string()
}
fn fizz(buzz: String) -> Option<Sweet> {
if buzz == "whatever" {
Some(Sweet::Cake(Cake::default()))
fn arr(stuff: Vec<Coordinate>) -> Option<&str> {
if stuff.is_empty() {
None
} else {
Some(Sweet::IceCream(IceCream::default()))
Some("stuff")
}
}
fn arr(stuff: Vec<Coordinate>) -> Option<&str> {
None
}
fn fruit() -> Fruit {
Fruit::Apple
}
Expand Down Expand Up @@ -690,9 +676,6 @@ mod test {
APPLE
ORANGE
}
interface Sweet {
isBrownie: Boolean!
}
type Cake {
fresh: Boolean!
}
Expand All @@ -703,7 +686,6 @@ mod test {
blah: Boolean!
"This is whatever's description."
whatever: String!
fizz(buzz: String!): Sweet
arr(stuff: [Coordinate!]!): String
fruit: Fruit!
glutenFree(flavor: String!): GlutenFree!
Expand Down

0 comments on commit 5835557

Please sign in to comment.