P5 7617 cleanup market and locale (#10)

* Minor fixes

* Cleanup with adding Locale type

* Add locales to test
This commit is contained in:
Niklas Fondberg
2021-08-12 10:51:02 +02:00
committed by GitHub
parent 7047fe9851
commit 58ed7fbf6a
10 changed files with 115 additions and 44 deletions
+4 -2
View File
@@ -5,12 +5,14 @@ import { CategoryAPI } from '../datasources/category-api';
import { Category } from '../types/category-types';
import { KeywordAPI } from '../datasources/keyword-api';
import { Keyword } from '../types/keyword-types';
import { MarketAPI } from '../datasources/market-api';
import { MarketLocaleAPI } from '../datasources/market-locale-api';
import { InteriorAPI } from '../datasources/interior-api';
const ProductBlacklist: IResolverObject = {
async market(parent, _args, { dataSources }) {
return (<MarketAPI>dataSources.marketApi).getMarketById(parent.marketId);
return (<MarketLocaleAPI>dataSources.marketLocaleApi).getMarketById(
parent.marketId,
);
},
};