Product info mutation (#14)

* Add mutation for product info

* Upgrade to apollo 3
This commit is contained in:
Niklas Fondberg
2021-08-27 16:44:27 +02:00
committed by GitHub
parent 964a904f42
commit 2b67bc506f
18 changed files with 12777 additions and 1052 deletions
+1 -2
View File
@@ -1,8 +1,7 @@
import { IResolverObject } from 'graphql-tools';
import { CategoryAPI } from '../datasources/category-api';
import { ProductAPI } from '../datasources/product-api';
const Category: IResolverObject = {
const Category = {
async products({ id }, _args, { dataSources }) {
return (<ProductAPI>dataSources.productApi).getCategoryProducts(id);
},