Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pothos/packages/core/utils/index.ts>completeValue

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Latest
function completeValue
import { completeValue } from "https://deno.land/x/pothos@release-1730496474/packages/core/utils/index.ts";

Helper for allowing plugins to fulfill the return of the next resolver, without paying the cost of the Promise if not required.

Parameters

valOrPromise: PromiseLike<T> | T
onSuccess: (completedVal: T) => R
optional
onError: (errVal: unknown) => R

Returns

Promise<R> | R