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(FieldCoordinates coordinates,
DataFetcher<?> dataFetcher)
Sets the data fetcher for a specific field inside a container type
|
GraphQLCodeRegistry.Builder |
dataFetcher(FieldCoordinates coordinates,
DataFetcherFactory<?> dataFetcherFactory)
Sets the data fetcher factory for a specific field inside a container type
|
GraphQLCodeRegistry.Builder |
dataFetcher(GraphQLFieldsContainer parentType,
GraphQLFieldDefinition fieldDefinition,
DataFetcher<?> dataFetcher)
Sets the data fetcher for a specific field inside a container type
|
GraphQLCodeRegistry.Builder |
dataFetcherIfAbsent(FieldCoordinates coordinates,
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(GraphQLCodeRegistry codeRegistry) |
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(FieldCoordinates coordinates,
GraphQLFieldDefinition fieldDefinition)
Returns a data fetcher associated with a field located at specified coordinates.
|
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(FieldCoordinates coordinates)
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(FieldCoordinates coordinates,
DataFetcher<?> dataFetcher)
Called to place system data fetchers (eg Introspection fields) into the mix
|
GraphQLCodeRegistry.Builder |
typeResolver(GraphQLInterfaceType interfaceType,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolver(GraphQLUnionType unionType,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolver(java.lang.String typeName,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolverIfAbsent(GraphQLInterfaceType interfaceType,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolverIfAbsent(GraphQLUnionType unionType,
TypeResolver typeResolver) |
GraphQLCodeRegistry.Builder |
typeResolvers(GraphQLCodeRegistry codeRegistry) |
public DataFetcher getDataFetcher(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition)
parentType
- the container typefieldDefinition
- the field definitionpublic DataFetcher getDataFetcher(FieldCoordinates coordinates, GraphQLFieldDefinition fieldDefinition)
coordinates
- the field coordinatesfieldDefinition
- the field definitionpublic boolean hasDataFetcher(FieldCoordinates coordinates)
coordinates
- the field coordinatespublic 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(FieldCoordinates coordinates, DataFetcher<?> dataFetcher)
coordinates
- the field coordinatesdataFetcher
- the data fetcher code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcher(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition, DataFetcher<?> dataFetcher)
parentType
- the container typefieldDefinition
- the field definitiondataFetcher
- the data fetcher code for that fieldpublic GraphQLCodeRegistry.Builder systemDataFetcher(FieldCoordinates coordinates, DataFetcher<?> dataFetcher)
coordinates
- the field coordinatesdataFetcher
- the data fetcher code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcher(FieldCoordinates coordinates, DataFetcherFactory<?> dataFetcherFactory)
coordinates
- the field coordinatesdataFetcherFactory
- the data fetcher factory code for that fieldpublic GraphQLCodeRegistry.Builder dataFetcherIfAbsent(FieldCoordinates coordinates, DataFetcher<?> dataFetcher)
coordinates
- the field coordinatesdataFetcher
- the data fetcher code for that fieldpublic 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 dataFetchers(GraphQLCodeRegistry codeRegistry)
public GraphQLCodeRegistry.Builder typeResolver(GraphQLInterfaceType interfaceType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolverIfAbsent(GraphQLInterfaceType interfaceType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolver(GraphQLUnionType unionType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolverIfAbsent(GraphQLUnionType unionType, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolver(java.lang.String typeName, TypeResolver typeResolver)
public GraphQLCodeRegistry.Builder typeResolvers(GraphQLCodeRegistry codeRegistry)
public GraphQLCodeRegistry.Builder fieldVisibility(GraphqlFieldVisibility fieldVisibility)
public GraphQLCodeRegistry.Builder clearDataFetchers()
public GraphQLCodeRegistry.Builder clearTypeResolvers()
public GraphQLCodeRegistry build()