Quellcode durchsuchen

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

Giosuè Delgado vor 2 Jahren
Ursprung
Commit
8e9ee070d0
1 geänderte Dateien mit 1 neuen und 1 gelöschten Zeilen
  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> = {
     graphQlType: T;
     public?: boolean;
-    valueFn: (...args: Args) => R;
+    valueFn: (...args: Args) => Promise<R> | R;
 };
 
 type TypeVariationMap<GqlType extends GraphQlPrimitive, TsType> = {