graphql.nadel.enginekt.transform.hydration.NadelHydrationInputBuilder.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nadel-engine-nextgen Show documentation
Show all versions of nadel-engine-nextgen Show documentation
Nadel is a Java library that combines multiple GrahpQL services together into one API.
The newest version!
package graphql.nadel.enginekt.transform.hydration
import graphql.language.NullValue
import graphql.nadel.enginekt.blueprint.NadelHydrationFieldInstruction
import graphql.nadel.enginekt.blueprint.hydration.NadelHydrationActorInputDef
import graphql.nadel.enginekt.blueprint.hydration.NadelHydrationActorInputDef.ValueSource
import graphql.nadel.enginekt.blueprint.hydration.NadelHydrationStrategy
import graphql.nadel.enginekt.transform.artificial.NadelAliasHelper
import graphql.nadel.enginekt.transform.result.json.JsonNode
import graphql.nadel.enginekt.transform.result.json.JsonNodeExtractor
import graphql.nadel.enginekt.util.emptyOrSingle
import graphql.nadel.enginekt.util.flatten
import graphql.nadel.enginekt.util.javaValueToAstValue
import graphql.nadel.enginekt.util.makeNormalizedInputValue
import graphql.nadel.enginekt.util.toMapStrictly
import graphql.normalized.ExecutableNormalizedField
import graphql.normalized.NormalizedInputValue
internal class NadelHydrationInputBuilder private constructor(
private val instruction: NadelHydrationFieldInstruction,
private val aliasHelper: NadelAliasHelper,
private val fieldToHydrate: ExecutableNormalizedField,
private val parentNode: JsonNode,
) {
companion object {
fun getInputValues(
instruction: NadelHydrationFieldInstruction,
aliasHelper: NadelAliasHelper,
fieldToHydrate: ExecutableNormalizedField,
parentNode: JsonNode,
): List