Преглед изворни кода

fix(elasticsearch-plugin): Fix type to allow the promise on custom mapping definition (#2562)

Giosuè Delgado пре 2 година
родитељ
комит
8e9ee070d0
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      packages/elasticsearch-plugin/src/types.ts

+ 1 - 1
packages/elasticsearch-plugin/src/types.ts

@@ -271,7 +271,7 @@ type GraphQlPermittedReturnType = PrimitiveTypeVariations<GraphQlPrimitive>;
 type CustomMappingDefinition<Args extends any[], T extends GraphQlPermittedReturnType, R> = {
 type CustomMappingDefinition<Args extends any[], T extends GraphQlPermittedReturnType, R> = {
     graphQlType: T;
     graphQlType: T;
     public?: boolean;
     public?: boolean;
-    valueFn: (...args: Args) => R;
+    valueFn: (...args: Args) => Promise<R> | R;
 };
 };
 
 
 type TypeVariationMap<GqlType extends GraphQlPrimitive, TsType> = {
 type TypeVariationMap<GqlType extends GraphQlPrimitive, TsType> = {