Home > @uniformdev/mesh-edgehancer-sdk > convertBatchResultsToEdgehancerResult
convertBatchResultsToEdgehancerResult() function
Given a batch of data resources and their batch-fetch results, convert them into a result that can be returned from a request hook.
Signature:
Parameters
Parameter | Type | Description |
---|---|---|
{ batch, batchFetchIds: { invalidBatchIndices, validIdToOriginalIndexMap }, batchResults, resolveIdFromBatchResultFn, knownInvalidErrorMessage, missingBatchResultErrorMessage, } | ConvertBatchResultsToEdgehancerResultOptions<TID, TResultItem> |
Returns:
{ errors?: (string | { message: string; subType?: "unpublishedData" | "configuration" | undefined; issueReference?: string | undefined; deepLink?: string | undefined; })[] | undefined; warnings?: (string | { message: string; subType?: "unpublishedData" | "configuration" | undefined; issueReference?: string | undefined; deepLink?: string | undefined; })[] | undefined; infos?: (string | { message: string; subType?: "unpublishedData" | "configuration" | undefined; issueReference?: string | undefined; deepLink?: string | undefined; })[] | undefined; surrogateKeys?: string[] | undefined; result?: string | number | boolean | unknown[] | zod.objectOutputType<{}, zod.ZodUnknown, "strip"> | undefined; }[]