diff --git a/async-graphql-derive/src/interface.rs b/async-graphql-derive/src/interface.rs index 82c5d6a2..b52e49ad 100644 --- a/async-graphql-derive/src/interface.rs +++ b/async-graphql-derive/src/interface.rs @@ -64,7 +64,7 @@ pub fn generate(interface_args: &args::Interface, input: &DeriveInput) -> Result if let #ident::#enum_name(obj) = self { return #crate_name::collect_fields(ctx, obj, futures); } - unreachable!() + return Ok(()); } }); get_introspection_typename.push(quote! { diff --git a/async-graphql-derive/src/union.rs b/async-graphql-derive/src/union.rs index 61e9a4c4..28f8cc9c 100644 --- a/async-graphql-derive/src/union.rs +++ b/async-graphql-derive/src/union.rs @@ -60,7 +60,7 @@ pub fn generate(interface_args: &args::Interface, input: &DeriveInput) -> Result if let #ident::#enum_name(obj) = self { return #crate_name::collect_fields(ctx, obj, futures); } - unreachable!() + return Ok(()); } }); get_introspection_typename.push(quote! {