Product info mutation (#14)
* Add mutation for product info * Upgrade to apollo 3
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user