Class DataLoaderDispatchingContextKeys
java.lang.Object
graphql.execution.instrumentation.dataloader.DataLoaderDispatchingContextKeys
GraphQLContext keys related to DataLoader dispatching.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Enables the ability to chain DataLoader dispatching.static final String
Enabled a different dispatching strategy that mimics the JS event loop based one: DataLoader will be dispatched as soon as there is no data fetcher or batch loader currently running. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
setEnableDataLoaderChaining
(GraphQLContext graphQLContext, boolean enabled) Enables the ability that chained DataLoaders are dispatched automatically.static void
setEnableDataLoaderExhaustedDispatching
(GraphQLContext graphQLContext, boolean enabled) Enables the ability that chained DataLoaders are dispatched automatically.
-
Field Details
-
ENABLE_DATA_LOADER_CHAINING
Enables the ability to chain DataLoader dispatching.Because this requires that all DataLoaders are accessed via DataFetchingEnvironment.getLoader() this is not completely backwards compatible and therefore disabled by default.
Expects a boolean value.
- See Also:
-
ENABLE_DATA_LOADER_EXHAUSTED_DISPATCHING
Enabled a different dispatching strategy that mimics the JS event loop based one: DataLoader will be dispatched as soon as there is no data fetcher or batch loader currently running.- See Also:
-
-
Method Details
-
setEnableDataLoaderChaining
Enables the ability that chained DataLoaders are dispatched automatically.- Parameters:
graphQLContext
-
-
setEnableDataLoaderExhaustedDispatching
public static void setEnableDataLoaderExhaustedDispatching(GraphQLContext graphQLContext, boolean enabled) Enables the ability that chained DataLoaders are dispatched automatically.- Parameters:
graphQLContext
-
-