You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Preloading all the data will not be optimal with the magnitude of asteroids and planet data that will be loaded from the API. On a slow connection, pre-loading all this data may even exceed 3 or 5 minutes. Therefore, a dataloader factory will be created to produce the data loading mechanism to get the data from the API.
Acceptance Criteria
Data can be loaded on demand and when necessary
Factory can load the data when needed
Multiple data loaders can be created
Implementation
Create a DataLoader factory that has a create data loader method
The method will accept a string input and if matched, load the requested data
Create a PlanetDataLoader class, and give it a load method that will load the requested data from the API gateway. With the loaded data as a response invoke the create planet method with the response data provided.
Modifications to existing implementation
The interactor will access the repository and add the planet within
The GetMainPlanet data will need to be renamed to CreateMainPlanet
A Get controller action will need to exist to get the data from the API. This will have to be lightweight as possible and accesses the repository.
The text was updated successfully, but these errors were encountered:
Description
Preloading all the data will not be optimal with the magnitude of asteroids and planet data that will be loaded from the API. On a slow connection, pre-loading all this data may even exceed 3 or 5 minutes. Therefore, a dataloader factory will be created to produce the data loading mechanism to get the data from the API.
Acceptance Criteria
Implementation
The text was updated successfully, but these errors were encountered: