UNPKG

@pothos/core

Version:

Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript

26 lines (25 loc) 1.92 kB
import { type DirectiveNode, type FieldNode, type GraphQLDirective, type GraphQLField } from 'graphql'; import { type InputType, type InputTypeParam, type OutputType, type PartialResolveInfo, type SchemaTypes, type TypeParam } from '../types/index.js'; export * from './base64.js'; export * from './context-cache.js'; export * from './enums.js'; export * from './input.js'; export * from './params.js'; export * from './sort-classes.js'; export declare function assertNever(value: never): never; export declare function assertArray(value: unknown): value is unknown[]; export declare function isThenable(value: unknown): value is PromiseLike<unknown>; export declare function verifyRef(ref: unknown): void; export declare function verifyInterfaces(interfaces: unknown): void; export declare function brandWithType<Types extends SchemaTypes>(val: unknown, type: OutputType<Types>): void; export declare function getTypeBrand(val: unknown): OutputType<SchemaTypes> | null; export declare function unwrapListParam<Types extends SchemaTypes>(param: InputTypeParam<Types> | TypeParam<Types>): InputType<Types> | OutputType<Types>; export declare function unwrapOutputListParam<Types extends SchemaTypes>(param: TypeParam<Types>): OutputType<Types>; export declare function unwrapInputListParam<Types extends SchemaTypes>(param: InputTypeParam<Types>): InputType<Types>; /** * Helper for allowing plugins to fulfill the return of the `next` resolver, without paying the cost of the * Promise if not required. */ export declare function completeValue<T, R>(valOrPromise: PromiseLike<T> | T, onSuccess: (completedVal: T) => R, onError?: (errVal: unknown) => R): Promise<R> | R; export declare function getMappedArgumentValues(def: GraphQLDirective | GraphQLField<unknown, unknown>, node: DirectiveNode | FieldNode, context: object, info: PartialResolveInfo): Record<string, unknown>; //# sourceMappingURL=index.d.ts.map