@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
13 lines • 1.27 kB
TypeScript
import { FieldRef } from '../refs/field';
import type { FieldKind, FieldNullability, InputFieldMap, Resolver, SchemaTypes, ShapeFromTypeParam, TypeParam } from '../types';
export declare class BaseFieldUtil<Types extends SchemaTypes, ParentShape, Kind extends FieldKind> {
kind: Kind;
graphqlKind: PothosSchemaTypes.PothosKindToGraphQLType[Kind];
builder: PothosSchemaTypes.SchemaBuilder<Types>;
constructor(builder: PothosSchemaTypes.SchemaBuilder<Types>, kind: Kind, graphqlKind: PothosSchemaTypes.PothosKindToGraphQLType[Kind]);
protected createField<Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, Args extends InputFieldMap = {}>(options: PothosSchemaTypes.FieldOptions<Types, ParentShape, Type, Nullable, Args, any, {}> & {
resolve?: Resolver<unknown, {}, {}, unknown, unknown>;
}): FieldRef<Types, ShapeFromTypeParam<Types, Type, Nullable>, Kind>;
protected exposeField<Type extends TypeParam<Types>, Nullable extends FieldNullability<Type>, Name extends string & keyof ParentShape>(name: Name, { extensions, ...options }: PothosSchemaTypes.ObjectFieldOptions<Types, ParentShape, Type, Nullable, {}, {}>): FieldRef<Types, ShapeFromTypeParam<Types, Type, Nullable>, Kind>;
}
//# sourceMappingURL=base.d.ts.map