Explorar o código

fix(core): Loosen type def for ErrorResultUnion

Dependency on the built-in generated ErrorResult enum made it incompatible with external extensions.
Michael Bromley %!s(int64=4) %!d(string=hai) anos
pai
achega
43ce7224ed
Modificáronse 1 ficheiros con 4 adicións e 4 borrados
  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';
 
-export type GraphQLErrorResult = GraphQLErrorResultShop | GraphQLErrorResultAdmin;
+export type GraphQLErrorResult = {
+    errorCode: string;
+    message: string;
+};
 
 /**
  * @description