Add translation for product names (#74)

This commit is contained in:
Niklas Fondberg
2021-10-26 10:08:25 +02:00
committed by GitHub
parent ac5be19649
commit 56ad07edf8
5 changed files with 127 additions and 4 deletions
+4 -2
View File
@@ -18,6 +18,7 @@ import { InteriorAPI } from './datasources/interior-api';
import { ClaimVerifyResult, verifyToken } from './cognito/cognito-client';
import { readFileSync } from 'fs';
import { InteriorsLambdaAPI } from './datasources/interiors-lambda-api';
import { TextsAPI } from './datasources/texts-api';
const path = require('path');
const typeDefs = readFileSync(
path.join(__dirname, './schema.graphql'),
@@ -27,15 +28,16 @@ const typeDefs = readFileSync(
const knexConfig = knexStringcase(dbConfig);
// set up any dataSources our resolvers need
const marketLocaleApi = new MarketLocaleAPI(knexConfig);
const textsApi = new TextsAPI(knexConfig, marketLocaleApi);
const categoryApi = new CategoryAPI(knexConfig);
const designerApi = new DesignerAPI(knexConfig);
const imageServerApi = new ImageServerApi();
const interiorsLambdaApi = new InteriorsLambdaAPI();
const interiorApi = new InteriorAPI(knexConfig, imageServerApi);
const keywordApi = new KeywordAPI(knexConfig);
const marketLocaleApi = new MarketLocaleAPI(knexConfig);
const orderApi = new OrderAPI(knexConfig);
const productApi = new ProductAPI(knexConfig);
const productApi = new ProductAPI(knexConfig, textsApi);
const dataSources = () => ({
categoryApi,