public static class GraphQLCodeRegistry.Builder
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
GraphQLCodeRegistry |
build() |
GraphQLCodeRegistry.Builder |
clearDataFetchers() |
GraphQLCodeRegistry.Builder |
clearTypeResolvers() |
GraphQLCodeRegistry.Builder |
dataFetcher(GraphQLCodeRegistry.TypeAndFieldKey key,
DataFetcher<?> dataFetcher) |
GraphQLCodeRegistry.Builder |
dataFetcher(GraphQLFieldsContainer parentTypeContainer,
GraphQLFieldDefinition fieldDefinition,
DataFetcher<?> dataFetcher)
Sets the data fetcher for a specific field inside a container type
|
GraphQLCodeRegistry.Builder |
dataFetcher(GraphQLFieldsContainer parentTypeContainer,
GraphQLFieldDefinition fieldDefinition,
DataFetcherFactory<?> dataFetcherFactory)
Sets the data fetcher factory for a specific field inside a container type
|
GraphQLCodeRegistry.Builder |
dataFetcher(java.lang.String parentTypeName,
java.lang.String fieldName,
DataFetcher<?> dataFetcher)
Sets the data fetcher for a specific field inside a container type
|
GraphQLCodeRegistry.Builder |
dataFetcher(java.lang.String parentTypeName,
java.lang.String fieldName,
DataFetcherFactory<?> dataFetcherFactory)
Sets the data fetcher factory for a specific field inside a container type
|
GraphQLCodeRegistry.Builder |
dataFetcherIfAbsent(GraphQLFieldsContainer parentTypeContainer,
GraphQLFieldDefinition fieldDefinition,
DataFetcher<?> dataFetcher)
Sets the data fetcher factory for a specific field inside a container type ONLY if not mapping has already been made
|
GraphQLCodeRegistry.Builder |
dataFetchers(GraphQLFieldsContainer parentTypeContainer,
java.util.Map<java.lang.String,DataFetcher> fieldDataFetchers)
This allows you you to build all the data fetchers for the fields of a container type.
|
GraphQLCodeRegistry.Builder |
dataFetchers(java.lang.String parentTypeName,
java.util.Map<java.lang.String,DataFetcher> fieldDataFetchers)
This allows you you to build all the data fetchers for the fields of a container type.
|
GraphQLCodeRegistry.Builder |
fieldVisibility(GraphqlFieldVisibility fieldVisibility) |
DataFetcher |
getDataFetcher(GraphQLFieldsContainer parentType,
GraphQLFieldDefinition fieldDefinition)
Returns a data fetcher associated with a field within a container type
|
TypeResolver |
getTypeResolver(GraphQLInterfaceType interfaceType)
Returns the type resolver associated with this interface type
|
TypeResolver |
getTypeResolver(GraphQLUnionType unionType)
Returns the type resolver associated with this union type
|
boolean |
hasDataFetcher(java.lang.String parentTypeName,
java.lang.String fieldName)
Returns a data fetcher associated with a field within a container type
|
boolean |
hasTypeResolver(java.lang.String typeName)
Returns true of a type resolver has been registered for this type name
|
GraphQLCodeRegistry.Builder |
systemDataFetcher(GraphQLFieldDefinition fieldDefinition,
DataFetcher<?> dataFetcher)
Called to place system data fetchers (eg Introspection fields) into the mix
|
GraphQLCodeRegistry.Builder |
typeResolver(GraphQLInterfaceType parentType,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolver(GraphQLUnionType parentType,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolver(java.lang.String parentTypeName,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolverIfAbsent(GraphQLInterfaceType parentType,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolverIfAbsent(GraphQLUnionType parentType,
TypeResolver typeResolver) |
public DataFetcher getDataFetcher(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition)
parentType
- the container typefieldDefinition
- the field definitionpublic boolean hasDataFetcher(java.lang.String parentTypeName, java.lang.String fieldName)
parentTypeName
- the container type namefieldName
- the field definition namepublic TypeResolver getTypeResolver(GraphQLInterfaceType interfaceType)
interfaceType
- the interface typeTypeResolver
public boolean hasTypeResolver(java.lang.String typeName)
typeName
- the name to checkpublic TypeResolver getTypeResolver(GraphQLUnionType unionType)
unionType
- the union typeTypeResolver
public GraphQLCodeRegistry.Builder dataFetcher(GraphQLFieldsContainer parentTypeContainer, GraphQLFieldDefinition fieldDefinition, DataFetcher<?> dataFetcher)
parentTypeContainer
- the parent container typefieldDefinition
- the field definitiondataFetcher
- the data fetcher code for that fieldpublic GraphQLCodeRegistry.Builder systemDataFetcher(GraphQLFieldDefinition fieldDefinition, DataFetcher<?> dataFetcher)
fieldDefinition
- the field definitiondataFetcher
- the data fetcher code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcher(GraphQLFieldsContainer parentTypeContainer, GraphQLFieldDefinition fieldDefinition, DataFetcherFactory<?> dataFetcherFactory)
parentTypeContainer
- the parent container typefieldDefinition
- the field definitiondataFetcherFactory
- the data fetcher factory code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcherIfAbsent(GraphQLFieldsContainer parentTypeContainer, GraphQLFieldDefinition fieldDefinition, DataFetcher<?> dataFetcher)
parentTypeContainer
- the parent container typefieldDefinition
- the field definitiondataFetcher
- the data fetcher code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcher(java.lang.String parentTypeName, java.lang.String fieldName, DataFetcher<?> dataFetcher)
parentTypeName
- the parent container typefieldName
- the field namedataFetcher
- the data fetcher code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcher(java.lang.String parentTypeName, java.lang.String fieldName, DataFetcherFactory<?> dataFetcherFactory)
parentTypeName
- the parent container typefieldName
- the field namedataFetcherFactory
- the data fetcher factory code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcher(GraphQLCodeRegistry.TypeAndFieldKey key, DataFetcher<?> dataFetcher)
public GraphQLCodeRegistry.Builder dataFetchers(GraphQLFieldsContainer parentTypeContainer, java.util.Map<java.lang.String,DataFetcher> fieldDataFetchers)
parentTypeContainer
- the parent container typefieldDataFetchers
- the map of field names to data fetcherspublic GraphQLCodeRegistry.Builder dataFetchers(java.lang.String parentTypeName, java.util.Map<java.lang.String,DataFetcher> fieldDataFetchers)
parentTypeName
- the parent container typefieldDataFetchers
- the map of field names to data fetcherspublic GraphQLCodeRegistry.Builder typeResolver(GraphQLInterfaceType parentType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolverIfAbsent(GraphQLInterfaceType parentType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolver(GraphQLUnionType parentType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolverIfAbsent(GraphQLUnionType parentType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolver(java.lang.String parentTypeName, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder fieldVisibility(GraphqlFieldVisibility fieldVisibility)
public GraphQLCodeRegistry.Builder clearDataFetchers()
public GraphQLCodeRegistry.Builder clearTypeResolvers()
public GraphQLCodeRegistry build()