From 19328d162e10318f78dec08358be5b58793bf29e Mon Sep 17 00:00:00 2001 From: sbarker2 <109047597+sbarker2@users.noreply.github.com> Date: Mon, 18 Dec 2023 14:58:19 +1300 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Franklin Wang <9077461+gnawf@users.noreply.github.com> --- .../engine/blueprint/NadelExecutionBlueprintFactory.kt | 6 +----- .../blueprint/hydration/NadelHydrationWhenCondition.kt | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lib/src/main/java/graphql/nadel/engine/blueprint/NadelExecutionBlueprintFactory.kt b/lib/src/main/java/graphql/nadel/engine/blueprint/NadelExecutionBlueprintFactory.kt index e74cad105..9c45cbdd3 100644 --- a/lib/src/main/java/graphql/nadel/engine/blueprint/NadelExecutionBlueprintFactory.kt +++ b/lib/src/main/java/graphql/nadel/engine/blueprint/NadelExecutionBlueprintFactory.kt @@ -269,10 +269,6 @@ private class Factory( ) } - private fun getHydrationCondition(): NadelHydrationWhenCondition? { - return null - } - private fun getHydrationCondition(hydration: UnderlyingServiceHydration): NadelHydrationWhenCondition? { if (hydration.conditionalHydration == null) { return null @@ -286,7 +282,7 @@ private class Factory( if (hydration.conditionalHydration.predicate.startsWith != null) { return NadelHydrationWhenCondition.StringResultStartsWith( fieldPath = NadelQueryPath(hydration.conditionalHydration.sourceField), - value = hydration.conditionalHydration.predicate.startsWith + prefix = hydration.conditionalHydration.predicate.startsWith ) } if (hydration.conditionalHydration.predicate.matches != null) { diff --git a/lib/src/main/java/graphql/nadel/engine/blueprint/hydration/NadelHydrationWhenCondition.kt b/lib/src/main/java/graphql/nadel/engine/blueprint/hydration/NadelHydrationWhenCondition.kt index 19fc68c2b..15e864891 100644 --- a/lib/src/main/java/graphql/nadel/engine/blueprint/hydration/NadelHydrationWhenCondition.kt +++ b/lib/src/main/java/graphql/nadel/engine/blueprint/hydration/NadelHydrationWhenCondition.kt @@ -25,7 +25,7 @@ sealed class NadelHydrationWhenCondition { data class StringResultStartsWith( val fieldPath: NadelQueryPath, - val value: String, + val prefix: String, ) : NadelHydrationWhenCondition() { override fun evaluate(resultId: String): Boolean { TODO("Not yet implemented")