Uses of Interface
graphql.schema.DataFetcher
-
-
Uses of DataFetcher in graphql
Subinterfaces of DataFetcher in graphql Modifier and Type Interface Description interface
TrivialDataFetcher<T>
Mark a DataFetcher as trivial: If a data fetcher is simply mapping data from an object to a field, it can be considered a trivial data fetcher for the purposes of tracing and so on. -
Uses of DataFetcher in graphql.execution
Methods in graphql.execution with parameters of type DataFetcher Modifier and Type Method Description private java.util.concurrent.CompletableFuture<java.lang.Object>
ExecutionStrategy. invokeDataFetcher(ExecutionContext executionContext, ExecutionStrategyParameters parameters, GraphQLFieldDefinition fieldDef, java.util.function.Supplier<DataFetchingEnvironment> dataFetchingEnvironment, DataFetcher<?> dataFetcher)
-
Uses of DataFetcher in graphql.execution.instrumentation
Methods in graphql.execution.instrumentation that return DataFetcher Modifier and Type Method Description @NotNull DataFetcher<?>
ChainedInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters)
@NotNull DataFetcher<?>
ChainedInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
default @NotNull DataFetcher<?>
Instrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters)
default @NotNull DataFetcher<?>
Instrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
This is called to instrument aDataFetcher
just before it is used to fetch a field, allowing you to adjust what information is passed back or record information about specific data fetches.@NotNull DataFetcher<?>
SimplePerformantInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters)
@NotNull DataFetcher<?>
SimplePerformantInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
Methods in graphql.execution.instrumentation with parameters of type DataFetcher Modifier and Type Method Description @NotNull DataFetcher<?>
ChainedInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters)
@NotNull DataFetcher<?>
ChainedInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
default @NotNull DataFetcher<?>
Instrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters)
default @NotNull DataFetcher<?>
Instrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
This is called to instrument aDataFetcher
just before it is used to fetch a field, allowing you to adjust what information is passed back or record information about specific data fetches.@NotNull DataFetcher<?>
SimplePerformantInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters)
@NotNull DataFetcher<?>
SimplePerformantInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
-
Uses of DataFetcher in graphql.execution.instrumentation.dataloader
Methods in graphql.execution.instrumentation.dataloader that return DataFetcher Modifier and Type Method Description @NotNull DataFetcher<?>
DataLoaderDispatcherInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState rawState)
Methods in graphql.execution.instrumentation.dataloader with parameters of type DataFetcher Modifier and Type Method Description @NotNull DataFetcher<?>
DataLoaderDispatcherInstrumentation. instrumentDataFetcher(DataFetcher<?> dataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState rawState)
-
Uses of DataFetcher in graphql.execution.instrumentation.threadpools
Methods in graphql.execution.instrumentation.threadpools that return DataFetcher Modifier and Type Method Description @NotNull DataFetcher<?>
ExecutorInstrumentation. instrumentDataFetcher(DataFetcher<?> originalDataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
Methods in graphql.execution.instrumentation.threadpools with parameters of type DataFetcher Modifier and Type Method Description @NotNull DataFetcher<?>
ExecutorInstrumentation. instrumentDataFetcher(DataFetcher<?> originalDataFetcher, InstrumentationFieldFetchParameters parameters, InstrumentationState state)
private java.util.function.Supplier<java.util.concurrent.CompletionStage<?>>
ExecutorInstrumentation. invokedAsync(DataFetcher<?> originalDataFetcher, DataFetchingEnvironment environment)
private java.util.concurrent.CompletableFuture<java.util.concurrent.CompletionStage<?>>
ExecutorInstrumentation. invokedSync(DataFetcher<?> originalDataFetcher, DataFetchingEnvironment environment)
private java.util.concurrent.CompletionStage<?>
ExecutorInstrumentation. invokeOriginalDF(DataFetcher<?> originalDataFetcher, DataFetchingEnvironment environment)
-
Uses of DataFetcher in graphql.introspection
Subinterfaces of DataFetcher in graphql.introspection Modifier and Type Interface Description interface
IntrospectionDataFetcher<T>
Special DataFetcher which is only used insideIntrospection
-
Uses of DataFetcher in graphql.relay
Classes in graphql.relay that implement DataFetcher Modifier and Type Class Description class
SimpleListConnection<T>
Methods in graphql.relay with parameters of type DataFetcher Modifier and Type Method Description GraphQLFieldDefinition
Relay. mutation(java.lang.String name, java.lang.String fieldName, java.util.List<GraphQLInputObjectField> inputFields, java.util.List<GraphQLFieldDefinition> outputFields, DataFetcher dataFetcher)
GraphQLFieldDefinition
Relay. mutationWithClientMutationId(java.lang.String name, java.lang.String fieldName, java.util.List<GraphQLInputObjectField> inputFields, java.util.List<GraphQLFieldDefinition> outputFields, DataFetcher dataFetcher)
GraphQLFieldDefinition
Relay. nodeField(GraphQLInterfaceType nodeInterface, DataFetcher nodeDataFetcher)
-
Uses of DataFetcher in graphql.schema
Subinterfaces of DataFetcher in graphql.schema Modifier and Type Interface Description interface
LightDataFetcher<T>
ALightDataFetcher
is a specialised version ofDataFetcher
that is passed more lightweight arguments when it is asked to fetch values.Classes in graphql.schema that implement DataFetcher Modifier and Type Class Description class
AsyncDataFetcher<T>
A modifier type that indicates the underlying data fetcher is run asynchronouslyclass
PropertyDataFetcher<T>
This is the default data fetcher used in graphql-java, and it will examine maps, records and POJO java beans for values that match the desired name, typically the field name, or it will use a provided function to obtain values.class
StaticDataFetcher
ADataFetcher
that always returns the same valueFields in graphql.schema declared as DataFetcher Modifier and Type Field Description private DataFetcher<T>
AsyncDataFetcher. wrappedDataFetcher
Methods in graphql.schema that return DataFetcher Modifier and Type Method Description DataFetcher<T>
DataFetcherFactory. get(DataFetcherFactoryEnvironment environment)
Returns aDataFetcher
DataFetcher<?>
GraphQLCodeRegistry.Builder. getDataFetcher(FieldCoordinates coordinates, GraphQLFieldDefinition fieldDefinition)
Returns a data fetcher associated with a field located at specified coordinates.DataFetcher<?>
GraphQLCodeRegistry.Builder. getDataFetcher(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition)
Deprecated.This is confusing becauseGraphQLInterfaceType
s cant have data fetchers.DataFetcher<?>
GraphQLCodeRegistry.Builder. getDataFetcher(GraphQLObjectType parentType, GraphQLFieldDefinition fieldDefinition)
Returns a data fetcher associated with a field within an object typeDataFetcher<?>
GraphQLCodeRegistry. getDataFetcher(FieldCoordinates coordinates, GraphQLFieldDefinition fieldDefinition)
Returns a data fetcher associated with a field located at specified coordinates.DataFetcher<?>
GraphQLCodeRegistry. getDataFetcher(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition)
Deprecated.This is confusing becauseGraphQLInterfaceType
s cant have data fetchers.DataFetcher<?>
GraphQLCodeRegistry. getDataFetcher(GraphQLObjectType parentType, GraphQLFieldDefinition fieldDefinition)
Returns a data fetcher associated with a field within an object type(package private) DataFetcher<?>
GraphQLFieldDefinition. getDataFetcher()
Deprecated.private static DataFetcher<?>
GraphQLCodeRegistry. getDataFetcherImpl(FieldCoordinates coordinates, GraphQLFieldDefinition fieldDefinition, java.util.Map<FieldCoordinates,DataFetcherFactory<?>> dataFetcherMap, java.util.Map<java.lang.String,DataFetcherFactory<?>> systemDataFetcherMap, DataFetcherFactory<?> defaultDataFetcherFactory)
DataFetcher<T>
AsyncDataFetcher. getWrappedDataFetcher()
static DataFetcher
DataFetcherFactories. wrapDataFetcher(DataFetcher delegateDataFetcher, java.util.function.BiFunction<DataFetchingEnvironment,java.lang.Object,java.lang.Object> mapFunction)
This helper function allows you to wrap an existing data fetcher and map the value once it completes.Methods in graphql.schema with parameters of type DataFetcher Modifier and Type Method Description static <T> AsyncDataFetcher<T>
AsyncDataFetcher. async(DataFetcher<T> wrappedDataFetcher)
A factory method for creating asynchronous data fetchers so that when used with static imports allows more readable code such as:static <T> AsyncDataFetcher<T>
AsyncDataFetcher. async(DataFetcher<T> wrappedDataFetcher, java.util.concurrent.Executor executor)
A factory method for creating asynchronous data fetchers and setting theExecutor
they run in so that when used with static imports allows more readable code such as:GraphQLCodeRegistry.Builder
GraphQLCodeRegistry.Builder. dataFetcher(FieldCoordinates coordinates, DataFetcher<?> dataFetcher)
Sets the data fetcher for a specific field inside a container typeGraphQLCodeRegistry.Builder
GraphQLCodeRegistry.Builder. dataFetcher(GraphQLFieldsContainer parentType, GraphQLFieldDefinition fieldDefinition, DataFetcher<?> dataFetcher)
Deprecated.This is confusing becauseGraphQLInterfaceType
s cant have data fetchers.GraphQLCodeRegistry.Builder
GraphQLCodeRegistry.Builder. dataFetcher(GraphQLObjectType parentType, GraphQLFieldDefinition fieldDefinition, DataFetcher<?> dataFetcher)
Sets the data fetcher for a specific field inside an object typeGraphQLFieldDefinition.Builder
GraphQLFieldDefinition.Builder. dataFetcher(DataFetcher<?> dataFetcher)
Deprecated.useGraphQLCodeRegistry
insteadGraphQLCodeRegistry.Builder
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 madeGraphQLCodeRegistry.Builder
GraphQLCodeRegistry.Builder. systemDataFetcher(FieldCoordinates coordinates, DataFetcher<?> dataFetcher)
Called to place system data fetchers (eg Introspection fields) into the mixstatic <T> DataFetcherFactory<T>
DataFetcherFactories. useDataFetcher(DataFetcher<T> dataFetcher)
Creates aDataFetcherFactory
that always returns the providedDataFetcher
static DataFetcher
DataFetcherFactories. wrapDataFetcher(DataFetcher delegateDataFetcher, java.util.function.BiFunction<DataFetchingEnvironment,java.lang.Object,java.lang.Object> mapFunction)
This helper function allows you to wrap an existing data fetcher and map the value once it completes.Method parameters in graphql.schema with type arguments of type DataFetcher Modifier and Type Method Description GraphQLCodeRegistry.Builder
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.Constructors in graphql.schema with parameters of type DataFetcher Constructor Description AsyncDataFetcher(DataFetcher<T> wrappedDataFetcher)
AsyncDataFetcher(DataFetcher<T> wrappedDataFetcher, java.util.concurrent.Executor executor)
-
Uses of DataFetcher in graphql.schema.idl
Fields in graphql.schema.idl declared as DataFetcher Modifier and Type Field Description private DataFetcher
TypeRuntimeWiring.Builder. defaultDataFetcher
private DataFetcher
TypeRuntimeWiring. defaultDataFetcher
Fields in graphql.schema.idl with type parameters of type DataFetcher Modifier and Type Field Description private java.util.Map<java.lang.String,java.util.Map<java.lang.String,DataFetcher>>
RuntimeWiring.Builder. dataFetchers
private java.util.Map<java.lang.String,java.util.Map<java.lang.String,DataFetcher>>
RuntimeWiring. dataFetchers
private java.util.Map<java.lang.String,DataFetcher>
RuntimeWiring.Builder. defaultDataFetchers
private java.util.Map<java.lang.String,DataFetcher>
RuntimeWiring. defaultDataFetchers
private java.util.Map<java.lang.String,DataFetcher>
TypeRuntimeWiring.Builder. fieldDataFetchers
private java.util.Map<java.lang.String,DataFetcher>
TypeRuntimeWiring. fieldDataFetchers
Methods in graphql.schema.idl that return DataFetcher Modifier and Type Method Description private DataFetcher<?>
SchemaGeneratorHelper. dataFetcherOfLastResort(FieldWiringEnvironment environment)
DataFetcher
CombinedWiringFactory. getDataFetcher(FieldWiringEnvironment environment)
DataFetcher
MockedWiringFactory. getDataFetcher(FieldWiringEnvironment environment)
DataFetcher
NoopWiringFactory. getDataFetcher(FieldWiringEnvironment environment)
default DataFetcher
WiringFactory. getDataFetcher(FieldWiringEnvironment environment)
Returns aDataFetcher
given the type definitionDataFetcher
CombinedWiringFactory. getDefaultDataFetcher(FieldWiringEnvironment environment)
DataFetcher
EchoingWiringFactory. getDefaultDataFetcher(FieldWiringEnvironment environment)
DataFetcher
NoopWiringFactory. getDefaultDataFetcher(FieldWiringEnvironment environment)
DataFetcher
TypeRuntimeWiring. getDefaultDataFetcher()
default DataFetcher
WiringFactory. getDefaultDataFetcher(FieldWiringEnvironment environment)
All fields need a data fetcher of some sort and this method is called to provide the data fetcher that will be used if no specific one has been providedDataFetcher
RuntimeWiring. getDefaultDataFetcherForType(java.lang.String typeName)
DataFetcher<?>
SchemaDirectiveWiringEnvironment. getFieldDataFetcher()
This is useful as a shortcut to get the current fields existing data fetcherDataFetcher<?>
SchemaDirectiveWiringEnvironmentImpl. getFieldDataFetcher()
Methods in graphql.schema.idl that return types with arguments of type DataFetcher Modifier and Type Method Description java.util.Map<java.lang.String,DataFetcher>
RuntimeWiring. getDataFetcherForType(java.lang.String typeName)
java.util.Map<java.lang.String,java.util.Map<java.lang.String,DataFetcher>>
RuntimeWiring. getDataFetchers()
java.util.Map<java.lang.String,DataFetcher>
TypeRuntimeWiring. getFieldDataFetchers()
Methods in graphql.schema.idl with parameters of type DataFetcher Modifier and Type Method Description TypeRuntimeWiring.Builder
TypeRuntimeWiring.Builder. dataFetcher(java.lang.String fieldName, DataFetcher dataFetcher)
Adds a data fetcher for the current type to the specified fieldTypeRuntimeWiring.Builder
TypeRuntimeWiring.Builder. defaultDataFetcher(DataFetcher dataFetcher)
All fields in a type need a data fetcher of some sort and this method is called to provide the default data fetcher that will be used for this type if no specific one has been provided per field.GraphQLFieldDefinition
SchemaDirectiveWiringEnvironment. setFieldDataFetcher(DataFetcher<?> newDataFetcher)
This is a shortcut method to set a new data fetcher in the underlyingGraphQLCodeRegistry
against the current field.GraphQLFieldDefinition
SchemaDirectiveWiringEnvironmentImpl. setFieldDataFetcher(DataFetcher<?> newDataFetcher)
Method parameters in graphql.schema.idl with type arguments of type DataFetcher Modifier and Type Method Description TypeRuntimeWiring.Builder
TypeRuntimeWiring.Builder. dataFetchers(java.util.Map<java.lang.String,DataFetcher> dataFetchersMap)
Adds data fetchers for the current type to the specified fieldConstructors in graphql.schema.idl with parameters of type DataFetcher Constructor Description TypeRuntimeWiring(java.lang.String typeName, DataFetcher defaultDataFetcher, java.util.Map<java.lang.String,DataFetcher> fieldDataFetchers, TypeResolver typeResolver, EnumValuesProvider enumValuesProvider)
Constructor parameters in graphql.schema.idl with type arguments of type DataFetcher Constructor Description TypeRuntimeWiring(java.lang.String typeName, DataFetcher defaultDataFetcher, java.util.Map<java.lang.String,DataFetcher> fieldDataFetchers, TypeResolver typeResolver, EnumValuesProvider enumValuesProvider)
-