Browse Source

feat(core): Add isPrivate flag to Collection

Relates to #71
Michael Bromley 6 years ago
parent
commit
848c8b450d

+ 1 - 1
packages/common/src/generated-shop-types.ts

@@ -1,5 +1,5 @@
 // tslint:disable
-// Generated in 2019-04-25T09:11:09+02:00
+// Generated in 2019-04-25T13:30:55+02:00
 export type Maybe<T> = T | null;
 
 export interface OrderListOptions {

+ 50 - 38
packages/common/src/generated-types.ts

@@ -1,5 +1,5 @@
 // tslint:disable
-// Generated in 2019-04-25T09:11:10+02:00
+// Generated in 2019-04-25T13:30:57+02:00
 export type Maybe<T> = T | null;
 
 
@@ -169,6 +169,13 @@ export interface CollectionFilterParameter {
   position?: Maybe<NumberOperators>;
   
   description?: Maybe<StringOperators>;
+  
+  isPrivate?: Maybe<BooleanOperators>;
+}
+
+export interface BooleanOperators {
+  
+  eq?: Maybe<boolean>;
 }
 
 export interface ProductVariantListOptions {
@@ -224,11 +231,6 @@ export interface ProductVariantFilterParameter {
   enabled?: Maybe<BooleanOperators>;
 }
 
-export interface BooleanOperators {
-  
-  eq?: Maybe<boolean>;
-}
-
 export interface CountryListOptions {
   
   skip?: Maybe<number>;
@@ -714,6 +716,8 @@ export interface UpdateChannelInput {
 
 export interface CreateCollectionInput {
   
+  isPrivate?: Maybe<boolean>;
+  
   featuredAssetId?: Maybe<string>;
   
   assetIds?: Maybe<string[]>;
@@ -760,6 +764,8 @@ export interface UpdateCollectionInput {
   
   id: string;
   
+  isPrivate?: Maybe<boolean>;
+  
   featuredAssetId?: Maybe<string>;
   
   parentId?: Maybe<string>;
@@ -1169,18 +1175,6 @@ export interface UpdateRoleInput {
   permissions?: Maybe<Permission[]>;
 }
 
-export interface CreateTaxCategoryInput {
-  
-  name: string;
-}
-
-export interface UpdateTaxCategoryInput {
-  
-  id: string;
-  
-  name?: Maybe<string>;
-}
-
 export interface CreateShippingMethodInput {
   
   code: string;
@@ -1205,6 +1199,18 @@ export interface UpdateShippingMethodInput {
   calculator?: Maybe<ConfigurableOperationInput>;
 }
 
+export interface CreateTaxCategoryInput {
+  
+  name: string;
+}
+
+export interface UpdateTaxCategoryInput {
+  
+  id: string;
+  
+  name?: Maybe<string>;
+}
+
 export interface CreateTaxRateInput {
   
   name: string;
@@ -2074,6 +2080,8 @@ export namespace GetCollectionList {
     
     description: string;
     
+    isPrivate: Maybe<boolean>;
+    
     featuredAsset: Maybe<FeaturedAsset>;
     
     parent: Maybe<Parent>;
@@ -3618,6 +3626,8 @@ export namespace Collection {
     
     description: string;
     
+    isPrivate: Maybe<boolean>;
+    
     languageCode: Maybe<LanguageCode>;
     
     featuredAsset: Maybe<FeaturedAsset>;
@@ -4601,10 +4611,6 @@ export interface Query {
   
   role?: Maybe<Role>;
   
-  taxCategories: TaxCategory[];
-  
-  taxCategory?: Maybe<TaxCategory>;
-  
   shippingMethods: ShippingMethodList;
   
   shippingMethod?: Maybe<ShippingMethod>;
@@ -4613,6 +4619,10 @@ export interface Query {
   
   shippingCalculators: ConfigurableOperation[];
   
+  taxCategories: TaxCategory[];
+  
+  taxCategory?: Maybe<TaxCategory>;
+  
   taxRates: TaxRateList;
   
   taxRate?: Maybe<TaxRate>;
@@ -4839,6 +4849,8 @@ export interface Collection extends Node {
   
   productVariants: ProductVariantList;
   
+  isPrivate?: Maybe<boolean>;
+  
   customFields?: Maybe<Json>;
 }
 
@@ -5754,14 +5766,14 @@ export interface Mutation {
   createRole: Role;
   /** Update an existing Role */
   updateRole: Role;
-  /** Create a new TaxCategory */
-  createTaxCategory: TaxCategory;
-  /** Update an existing TaxCategory */
-  updateTaxCategory: TaxCategory;
   /** Create a new ShippingMethod */
   createShippingMethod: ShippingMethod;
   /** Update an existing ShippingMethod */
   updateShippingMethod: ShippingMethod;
+  /** Create a new TaxCategory */
+  createTaxCategory: TaxCategory;
+  /** Update an existing TaxCategory */
+  updateTaxCategory: TaxCategory;
   /** Create a new TaxRate */
   createTaxRate: TaxRate;
   /** Update an existing TaxRate */
@@ -5962,10 +5974,6 @@ export interface RoleQueryArgs {
   
   id: string;
 }
-export interface TaxCategoryQueryArgs {
-  
-  id: string;
-}
 export interface ShippingMethodsQueryArgs {
   
   options?: Maybe<ShippingMethodListOptions>;
@@ -5974,6 +5982,10 @@ export interface ShippingMethodQueryArgs {
   
   id: string;
 }
+export interface TaxCategoryQueryArgs {
+  
+  id: string;
+}
 export interface TaxRatesQueryArgs {
   
   options?: Maybe<TaxRateListOptions>;
@@ -6206,14 +6218,6 @@ export interface UpdateRoleMutationArgs {
   
   input: UpdateRoleInput;
 }
-export interface CreateTaxCategoryMutationArgs {
-  
-  input: CreateTaxCategoryInput;
-}
-export interface UpdateTaxCategoryMutationArgs {
-  
-  input: UpdateTaxCategoryInput;
-}
 export interface CreateShippingMethodMutationArgs {
   
   input: CreateShippingMethodInput;
@@ -6222,6 +6226,14 @@ export interface UpdateShippingMethodMutationArgs {
   
   input: UpdateShippingMethodInput;
 }
+export interface CreateTaxCategoryMutationArgs {
+  
+  input: CreateTaxCategoryInput;
+}
+export interface UpdateTaxCategoryMutationArgs {
+  
+  input: UpdateTaxCategoryInput;
+}
 export interface CreateTaxRateMutationArgs {
   
   input: CreateTaxRateInput;

+ 2 - 0
packages/core/e2e/__snapshots__/collection.e2e-spec.ts.snap

@@ -47,6 +47,7 @@ Object {
     },
   ],
   "id": "T_3",
+  "isPrivate": false,
   "languageCode": "en",
   "name": "Electronics",
   "parent": Object {
@@ -102,6 +103,7 @@ Object {
     },
   ],
   "id": "T_5",
+  "isPrivate": false,
   "languageCode": "en",
   "name": "Pear",
   "parent": Object {

+ 13 - 0
packages/core/e2e/default-search-plugin.e2e-spec.ts

@@ -232,6 +232,18 @@ describe('Default search plugin', () => {
             });
             expect(result.search.items.map(i => i.productVariantId)).toEqual(['T_1', 'T_2', 'T_4']);
         });
+
+        it('encodes collectionIds', async () => {
+            const result = await shopClient.query(SEARCH_PRODUCTS_SHOP, {
+                input: {
+                    groupByProduct: false,
+                    term: 'cactus',
+                    take: 1,
+                },
+            });
+
+            expect(result.search.items[0].collectionIds).toEqual(['T_2']);
+        });
     });
 
     describe('admin api', () => {
@@ -472,6 +484,7 @@ export const SEARCH_PRODUCTS_SHOP = gql`
                 productVariantName
                 productVariantPreview
                 sku
+                collectionIds
             }
         }
     }

+ 53 - 2
packages/core/e2e/shop-catalog.e2e-spec.ts

@@ -2,9 +2,9 @@
 import gql from 'graphql-tag';
 import path from 'path';
 
-import { CREATE_COLLECTION } from '../../../admin-ui/src/app/data/definitions/collection-definitions';
+import { CREATE_COLLECTION, UPDATE_COLLECTION } from '../../../admin-ui/src/app/data/definitions/collection-definitions';
 import { GET_PRODUCT_WITH_VARIANTS, UPDATE_PRODUCT_VARIANTS } from '../../../admin-ui/src/app/data/definitions/product-definitions';
-import { ConfigArgType, CreateCollection, LanguageCode } from '../../common/lib/generated-types';
+import { ConfigArgType, CreateCollection, LanguageCode, UpdateCollection } from '../../common/lib/generated-types';
 import { GetProductWithVariants, UpdateProductVariants } from '../../common/src/generated-types';
 import { facetValueCollectionFilter } from '../src/config/collection/default-collection-filters';
 
@@ -175,6 +175,48 @@ describe('Shop catalog', () => {
                 { id: 'T_27', name: 'Football' },
             ]);
         });
+
+        it('collection list', async () => {
+            const result = await shopClient.query(GET_COLLECTION_LIST);
+
+            expect(result.collections.items).toEqual([
+                { id: 'T_2', name: 'Plants' },
+                { id: 'T_3', name: 'My Collection' },
+            ]);
+        });
+
+        it('omits private collections', async () => {
+            await adminClient.query<UpdateCollection.Mutation, UpdateCollection.Variables>(UPDATE_COLLECTION, {
+                input: {
+                    id: collection.id,
+                    isPrivate: true,
+                },
+            });
+            const result = await shopClient.query(GET_COLLECTION_LIST);
+
+            expect(result.collections.items).toEqual([
+                { id: 'T_2', name: 'Plants' },
+            ]);
+        });
+
+        it('returns null for private collection', async () => {
+            const result = await shopClient.query(GET_COLLECTION_VARIANTS, { id: collection.id });
+
+            expect(result.collection).toBeNull();
+        });
+
+        it('product.collections list omits private collections', async () => {
+            const result = await shopClient.query(gql`{
+                product(id: "T_12") {
+                    collections {
+                        id
+                        name
+                    }
+                }
+            }`);
+
+            expect(result.product.collections).toEqual([]);
+        });
     });
 });
 
@@ -201,3 +243,12 @@ const GET_COLLECTION_VARIANTS = gql`
         }
     }
 `;
+
+const GET_COLLECTION_LIST = gql`{
+    collections {
+        items {
+            id
+            name
+        }
+    }
+}`;

+ 1 - 1
packages/core/src/api/common/id-codec.ts

@@ -3,7 +3,7 @@ import { ID } from '@vendure/common/lib/shared-types';
 import { EntityIdStrategy } from '../../config/entity-id-strategy/entity-id-strategy';
 import { VendureEntity } from '../../entity/base/base.entity';
 
-const ID_KEYS = ['id', 'productId', 'productVariantId'];
+const ID_KEYS = ['id', 'productId', 'productVariantId', 'collectionIds'];
 
 /**
  * This service is responsible for encoding/decoding entity IDs according to the configured EntityIdStrategy.

+ 2 - 1
packages/core/src/api/resolvers/entity/product-entity.resolver.ts

@@ -33,7 +33,8 @@ export class ProductEntityResolver {
     async collections(
         @Ctx() ctx: RequestContext,
         @Parent() product: Product,
+        @Api() apiType: ApiType,
     ): Promise<Array<Translated<Collection>>> {
-        return this.collectionService.getCollectionsByProductId(ctx, product.id);
+        return this.collectionService.getCollectionsByProductId(ctx, product.id, apiType === 'shop');
     }
 }

+ 20 - 15
packages/core/src/api/resolvers/shop/shop-products.resolver.ts

@@ -35,19 +35,13 @@ export class ShopProductsResolver {
         @Ctx() ctx: RequestContext,
         @Args() args: ProductsQueryArgs,
     ): Promise<PaginatedList<Translated<Product>>> {
-
-        let options: ListQueryOptions<Product>;
-        if (args.options) {
-            options = {
-                ...args.options,
-                filter: {
-                    ...args.options.filter,
-                    enabled: { eq: true },
-                },
-            };
-        } else {
-            options = {};
-        }
+        const options: ListQueryOptions<Product> = {
+            ...args.options,
+            filter: {
+                ...(args.options && args.options.filter),
+                enabled: { eq: true },
+            },
+        };
         return this.productService.findAll(ctx, options);
     }
 
@@ -71,7 +65,14 @@ export class ShopProductsResolver {
         @Ctx() ctx: RequestContext,
         @Args() args: CollectionsQueryArgs,
     ): Promise<PaginatedList<Translated<Collection>>> {
-        return this.collectionService.findAll(ctx, args.options || undefined);
+        const options: ListQueryOptions<Collection> = {
+            ...args.options,
+            filter: {
+                ...(args.options && args.options.filter),
+                isPrivate: { eq: false },
+            },
+        };
+        return this.collectionService.findAll(ctx, options || undefined);
     }
 
     @Query()
@@ -79,7 +80,11 @@ export class ShopProductsResolver {
         @Ctx() ctx: RequestContext,
         @Args() args: CollectionQueryArgs,
     ): Promise<Translated<Collection> | undefined> {
-        return this.collectionService.findOne(ctx, args.id);
+        const collection = await this.collectionService.findOne(ctx, args.id);
+        if (collection && collection.isPrivate) {
+            return;
+        }
+        return collection;
     }
 
     @Query()

+ 6 - 0
packages/core/src/api/schema/admin-api/collection.api.graphql

@@ -15,6 +15,10 @@ type Mutation {
     moveCollection(input: MoveCollectionInput!): Collection!
 }
 
+type Collection {
+    isPrivate: Boolean
+}
+
 # generated by generateListOptions function
 input CollectionListOptions
 
@@ -32,6 +36,7 @@ input CollectionTranslationInput {
 }
 
 input CreateCollectionInput {
+    isPrivate: Boolean
     featuredAssetId: ID
     assetIds: [ID!]
     parentId: ID
@@ -41,6 +46,7 @@ input CreateCollectionInput {
 
 input UpdateCollectionInput {
     id: ID!
+    isPrivate: Boolean
     featuredAssetId: ID
     parentId: ID
     assetIds: [ID!]

+ 3 - 0
packages/core/src/entity/collection/collection.entity.ts

@@ -44,6 +44,9 @@ export class Collection extends VendureEntity implements Translatable, HasCustom
     @Column()
     position: number;
 
+    @Column({ default: false })
+    isPrivate: boolean;
+
     name: LocaleString;
 
     description: LocaleString;

+ 2 - 6
packages/core/src/service/helpers/list-query-builder/list-query-builder.ts

@@ -52,12 +52,8 @@ export class ListQueryBuilder {
         // tslint:disable-next-line:no-non-null-assertion
         FindOptionsUtils.joinEagerRelations(qb, qb.alias, qb.expressionMap.mainAlias!.metadata);
 
-        filter.forEach(({ clause, parameters }, index) => {
-            if (index === 0) {
-                qb.where(clause, parameters);
-            } else {
-                qb.andWhere(clause, parameters);
-            }
+        filter.forEach(({ clause, parameters }) => {
+            qb.andWhere(clause, parameters);
         });
 
         if (extendedOptions.channelId) {

+ 8 - 3
packages/core/src/service/services/collection.service.ts

@@ -140,16 +140,21 @@ export class CollectionService implements OnModuleInit {
     async getCollectionsByProductId(
         ctx: RequestContext,
         productId: ID,
+        publicOnly: boolean,
     ): Promise<Array<Translated<Collection>>> {
-        const result = await this.connection
+        const qb = this.connection
             .getRepository(Collection)
             .createQueryBuilder('collection')
             .leftJoinAndSelect('collection.translations', 'translation')
             .leftJoin('collection.productVariants', 'variant')
             .where('variant.product = :productId', { productId })
             .groupBy('collection.id, translation.id')
-            .orderBy('collection.id', 'ASC')
-            .getMany();
+            .orderBy('collection.id', 'ASC');
+
+        if (publicOnly) {
+            qb.andWhere('collection.isPrivate = :isPrivate', { isPrivate: false });
+        }
+        const result = await qb.getMany();
 
         return result.map(collection => translateDeep(collection, ctx.languageCode));
     }

File diff suppressed because it is too large
+ 0 - 0
schema-admin.json


+ 147 - 127
schema.json

@@ -966,57 +966,6 @@
             "isDeprecated": false,
             "deprecationReason": null
           },
-          {
-            "name": "taxCategories",
-            "description": null,
-            "args": [],
-            "type": {
-              "kind": "NON_NULL",
-              "name": null,
-              "ofType": {
-                "kind": "LIST",
-                "name": null,
-                "ofType": {
-                  "kind": "NON_NULL",
-                  "name": null,
-                  "ofType": {
-                    "kind": "OBJECT",
-                    "name": "TaxCategory",
-                    "ofType": null
-                  }
-                }
-              }
-            },
-            "isDeprecated": false,
-            "deprecationReason": null
-          },
-          {
-            "name": "taxCategory",
-            "description": null,
-            "args": [
-              {
-                "name": "id",
-                "description": null,
-                "type": {
-                  "kind": "NON_NULL",
-                  "name": null,
-                  "ofType": {
-                    "kind": "SCALAR",
-                    "name": "ID",
-                    "ofType": null
-                  }
-                },
-                "defaultValue": null
-              }
-            ],
-            "type": {
-              "kind": "OBJECT",
-              "name": "TaxCategory",
-              "ofType": null
-            },
-            "isDeprecated": false,
-            "deprecationReason": null
-          },
           {
             "name": "shippingMethods",
             "description": null,
@@ -1119,6 +1068,57 @@
             "isDeprecated": false,
             "deprecationReason": null
           },
+          {
+            "name": "taxCategories",
+            "description": null,
+            "args": [],
+            "type": {
+              "kind": "NON_NULL",
+              "name": null,
+              "ofType": {
+                "kind": "LIST",
+                "name": null,
+                "ofType": {
+                  "kind": "NON_NULL",
+                  "name": null,
+                  "ofType": {
+                    "kind": "OBJECT",
+                    "name": "TaxCategory",
+                    "ofType": null
+                  }
+                }
+              }
+            },
+            "isDeprecated": false,
+            "deprecationReason": null
+          },
+          {
+            "name": "taxCategory",
+            "description": null,
+            "args": [
+              {
+                "name": "id",
+                "description": null,
+                "type": {
+                  "kind": "NON_NULL",
+                  "name": null,
+                  "ofType": {
+                    "kind": "SCALAR",
+                    "name": "ID",
+                    "ofType": null
+                  }
+                },
+                "defaultValue": null
+              }
+            ],
+            "type": {
+              "kind": "OBJECT",
+              "name": "TaxCategory",
+              "ofType": null
+            },
+            "isDeprecated": false,
+            "deprecationReason": null
+          },
           {
             "name": "taxRates",
             "description": null,
@@ -16088,8 +16088,8 @@
             "deprecationReason": null
           },
           {
-            "name": "createTaxCategory",
-            "description": "Create a new TaxCategory",
+            "name": "createShippingMethod",
+            "description": "Create a new ShippingMethod",
             "args": [
               {
                 "name": "input",
@@ -16099,7 +16099,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "CreateTaxCategoryInput",
+                    "name": "CreateShippingMethodInput",
                     "ofType": null
                   }
                 },
@@ -16111,7 +16111,7 @@
               "name": null,
               "ofType": {
                 "kind": "OBJECT",
-                "name": "TaxCategory",
+                "name": "ShippingMethod",
                 "ofType": null
               }
             },
@@ -16119,8 +16119,8 @@
             "deprecationReason": null
           },
           {
-            "name": "updateTaxCategory",
-            "description": "Update an existing TaxCategory",
+            "name": "updateShippingMethod",
+            "description": "Update an existing ShippingMethod",
             "args": [
               {
                 "name": "input",
@@ -16130,7 +16130,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "UpdateTaxCategoryInput",
+                    "name": "UpdateShippingMethodInput",
                     "ofType": null
                   }
                 },
@@ -16142,7 +16142,7 @@
               "name": null,
               "ofType": {
                 "kind": "OBJECT",
-                "name": "TaxCategory",
+                "name": "ShippingMethod",
                 "ofType": null
               }
             },
@@ -16150,8 +16150,8 @@
             "deprecationReason": null
           },
           {
-            "name": "createShippingMethod",
-            "description": "Create a new ShippingMethod",
+            "name": "createTaxCategory",
+            "description": "Create a new TaxCategory",
             "args": [
               {
                 "name": "input",
@@ -16161,7 +16161,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "CreateShippingMethodInput",
+                    "name": "CreateTaxCategoryInput",
                     "ofType": null
                   }
                 },
@@ -16173,7 +16173,7 @@
               "name": null,
               "ofType": {
                 "kind": "OBJECT",
-                "name": "ShippingMethod",
+                "name": "TaxCategory",
                 "ofType": null
               }
             },
@@ -16181,8 +16181,8 @@
             "deprecationReason": null
           },
           {
-            "name": "updateShippingMethod",
-            "description": "Update an existing ShippingMethod",
+            "name": "updateTaxCategory",
+            "description": "Update an existing TaxCategory",
             "args": [
               {
                 "name": "input",
@@ -16192,7 +16192,7 @@
                   "name": null,
                   "ofType": {
                     "kind": "INPUT_OBJECT",
-                    "name": "UpdateShippingMethodInput",
+                    "name": "UpdateTaxCategoryInput",
                     "ofType": null
                   }
                 },
@@ -16204,7 +16204,7 @@
               "name": null,
               "ofType": {
                 "kind": "OBJECT",
-                "name": "ShippingMethod",
+                "name": "TaxCategory",
                 "ofType": null
               }
             },
@@ -17446,6 +17446,16 @@
         "description": null,
         "fields": null,
         "inputFields": [
+          {
+            "name": "isPrivate",
+            "description": null,
+            "type": {
+              "kind": "SCALAR",
+              "name": "Boolean",
+              "ofType": null
+            },
+            "defaultValue": null
+          },
           {
             "name": "featuredAssetId",
             "description": null,
@@ -17724,6 +17734,16 @@
             },
             "defaultValue": null
           },
+          {
+            "name": "isPrivate",
+            "description": null,
+            "type": {
+              "kind": "SCALAR",
+              "name": "Boolean",
+              "ofType": null
+            },
+            "defaultValue": null
+          },
           {
             "name": "featuredAssetId",
             "description": null,
@@ -20265,66 +20285,6 @@
         "enumValues": null,
         "possibleTypes": null
       },
-      {
-        "kind": "INPUT_OBJECT",
-        "name": "CreateTaxCategoryInput",
-        "description": null,
-        "fields": null,
-        "inputFields": [
-          {
-            "name": "name",
-            "description": null,
-            "type": {
-              "kind": "NON_NULL",
-              "name": null,
-              "ofType": {
-                "kind": "SCALAR",
-                "name": "String",
-                "ofType": null
-              }
-            },
-            "defaultValue": null
-          }
-        ],
-        "interfaces": null,
-        "enumValues": null,
-        "possibleTypes": null
-      },
-      {
-        "kind": "INPUT_OBJECT",
-        "name": "UpdateTaxCategoryInput",
-        "description": null,
-        "fields": null,
-        "inputFields": [
-          {
-            "name": "id",
-            "description": null,
-            "type": {
-              "kind": "NON_NULL",
-              "name": null,
-              "ofType": {
-                "kind": "SCALAR",
-                "name": "ID",
-                "ofType": null
-              }
-            },
-            "defaultValue": null
-          },
-          {
-            "name": "name",
-            "description": null,
-            "type": {
-              "kind": "SCALAR",
-              "name": "String",
-              "ofType": null
-            },
-            "defaultValue": null
-          }
-        ],
-        "interfaces": null,
-        "enumValues": null,
-        "possibleTypes": null
-      },
       {
         "kind": "INPUT_OBJECT",
         "name": "CreateShippingMethodInput",
@@ -20457,6 +20417,66 @@
         "enumValues": null,
         "possibleTypes": null
       },
+      {
+        "kind": "INPUT_OBJECT",
+        "name": "CreateTaxCategoryInput",
+        "description": null,
+        "fields": null,
+        "inputFields": [
+          {
+            "name": "name",
+            "description": null,
+            "type": {
+              "kind": "NON_NULL",
+              "name": null,
+              "ofType": {
+                "kind": "SCALAR",
+                "name": "String",
+                "ofType": null
+              }
+            },
+            "defaultValue": null
+          }
+        ],
+        "interfaces": null,
+        "enumValues": null,
+        "possibleTypes": null
+      },
+      {
+        "kind": "INPUT_OBJECT",
+        "name": "UpdateTaxCategoryInput",
+        "description": null,
+        "fields": null,
+        "inputFields": [
+          {
+            "name": "id",
+            "description": null,
+            "type": {
+              "kind": "NON_NULL",
+              "name": null,
+              "ofType": {
+                "kind": "SCALAR",
+                "name": "ID",
+                "ofType": null
+              }
+            },
+            "defaultValue": null
+          },
+          {
+            "name": "name",
+            "description": null,
+            "type": {
+              "kind": "SCALAR",
+              "name": "String",
+              "ofType": null
+            },
+            "defaultValue": null
+          }
+        ],
+        "interfaces": null,
+        "enumValues": null,
+        "possibleTypes": null
+      },
       {
         "kind": "INPUT_OBJECT",
         "name": "CreateTaxRateInput",

Some files were not shown because too many files changed in this diff