Repository: graphql-rust/juniper (language: rust)

Issue:
Panic when using interfaces: `Field homePlanet not found on type Some("Droid")`
**Reproducing**

Using the current `master` (4ffd276a). I am using the example from the docs of `graphql_interface`:

<details>

```rust
use juniper::{graphql_interface, GraphQLObject};

#[graphql_interface(for = [Human, Droid])] // enumerating all implementers is mandatory
trait Character {
    fn id(&self) -> &str;
}

#[derive(GraphQLObject)]
#[graphql(impl = CharacterValue)] // notice the enum type name, not trait name
struct Human {
    id: String,
    home_planet: String,
}
#[graphql_interface]
impl Character for Human {
    fn id(&self) -> &str {
        &self.id
    }
}

#[derive(GraphQLObject)]
#[graphql(impl = [CharacterValue])]
struct Droid {
    id: String,
    primary_function: String,
}
#[graphql_interface]
impl Character for Droid {
    fn id(&self) -> &str {
        &self.id
    }
}
```

</details>

On my root query type I have a simple dummy resolver:

```rust
#[graphql_object(Context = Context)]
impl Query {
    fn characters() -> Vec<CharacterValue> {
        vec![
            Human { id: "3".into(), home_planet: "banana".into() }.into(),
            Droid { id: "7".into(), primary_function: "nope".into() }.into(),
        ]
    }
}
```

The generated schema is as expected. When running this query:

```
query {
  characters { id }
}
```

... everything works nicely. I get `{"data": {"characters": [{"id": "3"}, {"id": "7"} ] } }` back. However, when I query like this:

```
query {
  characters {
    id,
    ... on Human {
      homePlanet,
    }
  }
}
```

**This causes a panic!** Specifically:

> thread 'tokio-runtime-worker' panicked at 'Field homePlanet not found on type Some("Droid")', /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:234:21

<details>
<summary>Stacktrace in my application:</summary>

```
stack backtrace:
   0: std::panicking::begin_panic
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:505
   1: juniper::types::async_await::resolve_selection_set_into_async_recursive::{{closure}}::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:234
   2: core::option::Option<T>::unwrap_or_else
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/option.rs:424
   3: juniper::types::async_await::resolve_selection_set_into_async_recursive::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:233
   4: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
   5: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
   6: juniper::types::async_await::GraphQLValueAsync::resolve_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:104
   7: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
   8: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
   9: juniper::executor::Executor<CtxT,S>::resolve_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:468
  10: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  11: juniper::executor::Executor<CtxT,S>::resolve_with_ctx_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:486
  12: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  13: <test::CharacterValue as juniper::types::async_await::GraphQLValueAsync<__S>>::resolve_into_type_async::{{closure}}::{{closure}}
             at ./main.rs:83
  14: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  15: <futures_util::future::future::flatten::Flatten<Fut,<Fut as core::future::future::Future>::Output> as core::future::future::Future>::poll
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/future/future/flatten.rs:51
  16: <futures_util::future::future::Then<Fut1,Fut2,F> as core::future::future::Future>::poll
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/lib.rs:107
  17: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
  18: juniper::types::async_await::resolve_selection_set_into_async_recursive::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:326
  19: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  20: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
  21: juniper::types::async_await::GraphQLValueAsync::resolve_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:104
  22: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  23: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
  24: juniper::executor::Executor<CtxT,S>::resolve_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:468
  25: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  26: juniper::executor::Executor<CtxT,S>::resolve_into_value_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:512
  27: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  28: juniper::types::containers::resolve_into_list_async::{{closure}}::{{closure}}::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/containers.rs:310
  29: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  30: <futures_util::stream::futures_ordered::OrderWrapper<T> as core::future::future::Future>::poll
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/futures_ordered.rs:52
  31: <futures_util::stream::futures_unordered::FuturesUnordered<Fut> as futures_core::stream::Stream>::poll_next
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/futures_unordered/mod.rs:542
  32: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/stream/mod.rs:1323
  33: <futures_util::stream::futures_ordered::FuturesOrdered<Fut> as futures_core::stream::Stream>::poll_next
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/futures_ordered.rs:170
  34: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/stream/mod.rs:1323
  35: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/stream/next.rs:35
  36: juniper::types::containers::resolve_into_list_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/containers.rs:314
  37: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  38: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
  39: juniper::executor::Executor<CtxT,S>::resolve_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:468
  40: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  41: juniper::executor::Executor<CtxT,S>::resolve_with_ctx_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:486
  42: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  43: <test::Query as juniper::types::async_await::GraphQLValueAsync<__S>>::resolve_field_async::{{closure}}
             at ./main.rs:15
  44: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  45: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
  46: juniper::types::async_await::resolve_selection_set_into_async_recursive::{{closure}}::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:266
  47: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  48: <juniper::types::async_await::resolve_selection_set_into_async_recursive::{{closure}}::AsyncValueFuture<A,B,C,D> as core::future::future::Future>::poll
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:190
  49: <futures_util::stream::futures_ordered::OrderWrapper<T> as core::future::future::Future>::poll
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/futures_ordered.rs:52
  50: <futures_util::stream::futures_unordered::FuturesUnordered<Fut> as futures_core::stream::Stream>::poll_next
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/futures_unordered/mod.rs:542
  51: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/stream/mod.rs:1323
  52: <futures_util::stream::futures_ordered::FuturesOrdered<Fut> as futures_core::stream::Stream>::poll_next
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/futures_ordered.rs:170
  53: futures_util::stream::stream::StreamExt::poll_next_unpin
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/stream/mod.rs:1323
  54: <futures_util::stream::stream::next::Next<St> as core::future::future::Future>::poll
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/stream/stream/next.rs:35
  55: juniper::types::async_await::resolve_selection_set_into_async_recursive::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:363
  56: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  57: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
  58: juniper::types::async_await::GraphQLValueAsync::resolve_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/types/async_await.rs:104
  59: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  60: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:119
  61: juniper::executor::Executor<CtxT,S>::resolve_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:468
  62: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  63: juniper::executor::Executor<CtxT,S>::resolve_into_value_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:512
  64: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  65: juniper::executor::execute_validated_query_async::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/executor/mod.rs:963
  66: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  67: juniper::execute::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/lib.rs:296
  68: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  69: juniper::http::GraphQLRequest<S>::execute::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/http/mod.rs:119
  70: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  71: juniper::http::GraphQLBatchRequest<S>::execute::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper/src/http/mod.rs:303
  72: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  73: juniper_hyper::execute_request::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper_hyper/src/lib.rs:199
  74: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  75: juniper_hyper::graphql::{{closure}}
             at /home/lukas/.cargo/git/checkouts/juniper-aa5e857cd28538c7/4ffd276a/juniper_hyper/src/lib.rs:53
  76: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
[...]
  78: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  79: <std::panic::AssertUnwindSafe<F> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:325
  80: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll::{{closure}}
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/future/future/catch_unwind.rs:28
  81: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:308
  82: std::panicking::try::do_call
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:381
  83: __rust_try
  84: std::panicking::try
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:345
  85: std::panic::catch_unwind
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:382
  86: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/future/future/catch_unwind.rs:28
[...]            
  88: <core::future::from_generator::GenFuture<T> as core::future::future::Future>::poll
             at /home/lukas/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/mod.rs:80
  89: <hyper::proto::h1::dispatch::Server<S,hyper::body::body::Body> as hyper::proto::h1::dispatch::Dispatch>::poll_msg
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.13.7/src/proto/h1/dispatch.rs:476
  90: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_write
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.13.7/src/proto/h1/dispatch.rs:284
  91: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_loop
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.13.7/src/proto/h1/dispatch.rs:151
  92: hyper::proto::h1::dispatch::Dispatcher<D,Bs,I,T>::poll_inner
             at /home/lukas/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.13.7/src/proto/h1/dispatch.rs:127
```

</details>

---

This is a bug, right? I think the GraphQL spec allows these queries, even if not all objects are of that downcasted type. In either way, it shouldn't panic, right?


Discussion / hints:
@LukasKalbertodt yup, definitely a bug. The resolving mechanism shouldn't look for  `...on Human` spread fields on non-Human types.
@tyranron Good to know! Thanks for the quick reply. Can I somehow help with fixing this bug? I'm unfamiliar with this codebase, but I could surely learn about it to fix the bug. Or are you already on it? :)
@LukasKalbertodt PR are always welcome 👍

I don't have an opportunity to work on it at the moment.

Fix patch:
diff --git a/juniper/src/schema/schema.rs b/juniper/src/schema/schema.rs
index 62f03cc51..261da6422 100644
--- a/juniper/src/schema/schema.rs
+++ b/juniper/src/schema/schema.rs
@@ -51,6 +51,10 @@ where
         QueryT::name(info)
     }
 
+    fn concrete_type_name(&self, context: &Self::Context, info: &Self::TypeInfo) -> String {
+        self.query_type.concrete_type_name(context, info)
+    }
+
     fn resolve_field(
         &self,
         info: &Self::TypeInfo,
diff --git a/juniper/src/types/async_await.rs b/juniper/src/types/async_await.rs
index 395faf5ef..6979e15ab 100644
--- a/juniper/src/types/async_await.rs
+++ b/juniper/src/types/async_await.rs
@@ -323,26 +323,30 @@ where
                 );
 
                 if let Some(ref type_condition) = fragment.type_condition {
-                    let sub_result = instance
-                        .resolve_into_type_async(
-                            info,
-                            type_condition.item,
-                            Some(&fragment.selection_set[..]),
-                            &sub_exec,
-                        )
-                        .await;
-
-                    if let Ok(Value::Object(obj)) = sub_result {
-                        for (k, v) in obj {
-                            async_values.push(AsyncValueFuture::InlineFragment1(async move {
-                                AsyncValue::Field(AsyncField {
-                                    name: k,
-                                    value: Some(v),
-                                })
-                            }));
+                    // Check whether the type matches the type condition.
+                    let concrete_type_name = instance.concrete_type_name(sub_exec.context(), info);
+                    if type_condition.item == concrete_type_name {
+                        let sub_result = instance
+                            .resolve_into_type_async(
+                                info,
+                                type_condition.item,
+                                Some(&fragment.selection_set[..]),
+                                &sub_exec,
+                            )
+                            .await;
+
+                        if let Ok(Value::Object(obj)) = sub_result {
+                            for (k, v) in obj {
+                                async_values.push(AsyncValueFuture::InlineFragment1(async move {
+                                    AsyncValue::Field(AsyncField {
+                                        name: k,
+                                        value: Some(v),
+                                    })
+                                }));
+                            }
+                        } else if let Err(e) = sub_result {
+                            sub_exec.push_error_at(e, *start_pos);
                         }
-                    } else if let Err(e) = sub_result {
-                        sub_exec.push_error_at(e, *start_pos);
                     }
                 } else {
                     async_values.push(AsyncValueFuture::InlineFragment2(async move {
diff --git a/juniper/src/types/base.rs b/juniper/src/types/base.rs
index 1b395d440..d25f7441d 100644
--- a/juniper/src/types/base.rs
+++ b/juniper/src/types/base.rs
@@ -532,19 +532,23 @@ where
                 );
 
                 if let Some(ref type_condition) = fragment.type_condition {
-                    let sub_result = instance.resolve_into_type(
-                        info,
-                        type_condition.item,
-                        Some(&fragment.selection_set[..]),
-                        &sub_exec,
-                    );
-
-                    if let Ok(Value::Object(object)) = sub_result {
-                        for (k, v) in object {
-                            merge_key_into(result, &k, v);
+                    // Check whether the type matches the type condition.
+                    let concrete_type_name = instance.concrete_type_name(sub_exec.context(), info);
+                    if type_condition.item == concrete_type_name {
+                        let sub_result = instance.resolve_into_type(
+                            info,
+                            type_condition.item,
+                            Some(&fragment.selection_set[..]),
+                            &sub_exec,
+                        );
+
+                        if let Ok(Value::Object(object)) = sub_result {
+                            for (k, v) in object {
+                                merge_key_into(result, &k, v);
+                            }
+                        } else if let Err(e) = sub_result {
+                            sub_exec.push_error_at(e, *start_pos);
                         }
-                    } else if let Err(e) = sub_result {
-                        sub_exec.push_error_at(e, *start_pos);
                     }
                 } else if !resolve_selection_set_into(
                     instance,


Test patch:
diff --git a/juniper/src/tests/query_tests.rs b/juniper/src/tests/query_tests.rs
index d671c5bf6..32d79c1ca 100644
--- a/juniper/src/tests/query_tests.rs
+++ b/juniper/src/tests/query_tests.rs
@@ -1,6 +1,7 @@
 use crate::{
     ast::InputValue,
     executor::Variables,
+    graphql_value,
     schema::model::RootNode,
     tests::fixtures::starwars::schema::{Database, Query},
     types::scalars::{EmptyMutation, EmptySubscription},
@@ -731,3 +732,36 @@ async fn test_object_typename() {
         ))
     );
 }
+
+#[tokio::test]
+async fn interface_inline_fragment_friends() {
+    let doc = r#"{
+        human(id: "1002") {
+            friends {
+                name
+                ... on Human { homePlanet }
+                ... on Droid { primaryFunction }
+            }
+        }
+    }"#;
+    let database = Database::new();
+    let schema = RootNode::new(
+        Query,
+        EmptyMutation::<Database>::new(),
+        EmptySubscription::<Database>::new(),
+    );
+
+    assert_eq!(
+        crate::execute(doc, None, &schema, &Variables::new(), &database).await,
+        Ok((
+            graphql_value!({"human": {
+                "friends": [
+                    {"name": "Luke Skywalker", "homePlanet": "Tatooine"},
+                    {"name": "Leia Organa", "homePlanet": "Alderaan"},
+                    {"name": "R2-D2", "primaryFunction": "Astromech"},
+                ],
+            }}),
+            vec![],
+        ))
+    );
+}