public class CodeRegistryUtil
extends java.lang.Object
| Constructor and Description |
|---|
CodeRegistryUtil() |
| Modifier and Type | Method and Description |
|---|---|
static graphql.schema.DataFetcher |
getDataFetcher(graphql.schema.GraphQLCodeRegistry.Builder codeRegistryBuilder,
graphql.schema.GraphQLSchemaElement parentElement,
graphql.schema.GraphQLFieldDefinition fieldDefinition)
this util method helps you retrieve the data fetcher from the code registry if you do not have the whole parent object (only parent name)
|
static void |
wrapDataFetcher(graphql.schema.GraphQLFieldDefinition fieldDefinition,
AnnotationsWiringEnvironment environment,
java.util.function.BiFunction<graphql.schema.DataFetchingEnvironment,java.lang.Object,java.lang.Object> mapFunction)
This util method helps you wrap your datafetcher with some lambda code
|
public static void wrapDataFetcher(graphql.schema.GraphQLFieldDefinition fieldDefinition,
AnnotationsWiringEnvironment environment,
java.util.function.BiFunction<graphql.schema.DataFetchingEnvironment,java.lang.Object,java.lang.Object> mapFunction)
fieldDefinition - The field you want to wrap its datafetcherenvironment - the environment object of the Wiring processmapFunction - the lambda expression to wrap withpublic static graphql.schema.DataFetcher getDataFetcher(graphql.schema.GraphQLCodeRegistry.Builder codeRegistryBuilder,
graphql.schema.GraphQLSchemaElement parentElement,
graphql.schema.GraphQLFieldDefinition fieldDefinition)
codeRegistryBuilder - the code registry builderparentElement - the parent namefieldDefinition - the field definition which the data fetcher is linked to