diff --git a/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/DataFetcherInvoker.kt b/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/DataFetcherInvoker.kt index 693b38433..f1673ebf6 100644 --- a/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/DataFetcherInvoker.kt +++ b/graphql-dgs/src/main/kotlin/com/netflix/graphql/dgs/internal/DataFetcherInvoker.kt @@ -65,7 +65,7 @@ class DataFetcherInvoker internal constructor( return ReflectionUtils.invokeMethod(bridgedMethod, dgsComponent) } - if (kotlinFunction != null) { + if (dgsComponent.javaClass.getDeclaredAnnotation(Metadata::class.java) != null && kotlinFunction != null) { return invokeKotlinMethod(kotlinFunction, environment) }