Class DataLoaderDispatchingContextKeys
java.lang.Object
graphql.execution.instrumentation.dataloader.DataLoaderDispatchingContextKeys
GraphQLContext keys related to DataLoader dispatching.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringEnables the ability to chain DataLoader dispatching.static final StringEnabled 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 voidsetEnableDataLoaderChaining(GraphQLContext graphQLContext, boolean enabled) Enables the ability that chained DataLoaders are dispatched automatically.static voidsetEnableDataLoaderExhaustedDispatching(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-
-