Created
September 29, 2019 18:24
-
-
Save kijanowski/41ac63809a5a3a7a9fe92a88a277e2a8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
@Scope(value = WebApplicationContext.SCOPE_APPLICATION, proxyMode = ScopedProxyMode.TARGET_CLASS) | |
@Profile("global") | |
public DataLoaderRegistry globalDataLoaderRegistry() { | |
DataLoaderRegistry dataLoaderRegistry = new DataLoaderRegistry(); | |
DataLoader<String, CountryTO> countryLoader = DataLoader.newDataLoader(graphQLDataFetchers.countryBatchLoader()); | |
dataLoaderRegistry.register("countries", countryLoader); | |
return dataLoaderRegistry; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment