From 71b04d70baa278f1bbb8f4ea490993d43672a75b Mon Sep 17 00:00:00 2001 From: pbakker Date: Sat, 4 Nov 2023 16:02:24 -0700 Subject: [PATCH] Fix issue where java datafetcher methods were incorrectly called as Kotlin functions --- .../com/netflix/graphql/dgs/internal/DataFetcherInvoker.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) }