Browse Source

fix(core): Loosen type def for ErrorResultUnion

Dependency on the built-in generated ErrorResult enum made it incompatible with external extensions.
Michael Bromley 4 years ago
parent
commit
43ce7224ed
1 changed files with 4 additions and 4 deletions
  1. 4 4
      packages/core/src/common/error/error-result.ts

+ 4 - 4
packages/core/src/common/error/error-result.ts

@@ -1,9 +1,9 @@
-import { ErrorResult as GraphQLErrorResultShop } from '@vendure/common/lib/generated-shop-types';
-import { ErrorResult, ErrorResult as GraphQLErrorResultAdmin } from '@vendure/common/lib/generated-types';
-
 import { VendureEntity } from '../../entity/base/base.entity';
 import { VendureEntity } from '../../entity/base/base.entity';
 
 
-export type GraphQLErrorResult = GraphQLErrorResultShop | GraphQLErrorResultAdmin;
+export type GraphQLErrorResult = {
+    errorCode: string;
+    message: string;
+};
 
 
 /**
 /**
  * @description
  * @description