@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
17 lines (16 loc) • 1.34 kB
TypeScript
import { type InterfaceParam, type ObjectTypeOptions, type OutputRef, outputShapeKey, type PothosMutationTypeConfig, type PothosObjectTypeConfig, type PothosQueryTypeConfig, type PothosSubscriptionTypeConfig, parentShapeKey, type SchemaTypes } from '../types/index.js';
import { TypeRefWithFields } from './base-with-fields.js';
export type ObjectLikeConfig = PothosMutationTypeConfig | PothosObjectTypeConfig | PothosQueryTypeConfig | PothosSubscriptionTypeConfig;
export declare class ObjectRef<Types extends SchemaTypes, T, P = T> extends TypeRefWithFields<Types, ObjectLikeConfig> implements OutputRef<T>, PothosSchemaTypes.ObjectRef<Types, T, P> {
kind: "Object";
$inferType: T;
[outputShapeKey]: T;
[parentShapeKey]: P;
constructor(name: string, config?: ObjectLikeConfig);
}
export declare class ImplementableObjectRef<Types extends SchemaTypes, Shape, Parent = Shape> extends ObjectRef<Types, Shape, Parent> {
builder: PothosSchemaTypes.SchemaBuilder<Types>;
constructor(builder: PothosSchemaTypes.SchemaBuilder<Types>, name: string);
implement<const Interfaces extends InterfaceParam<Types>[]>(options: Omit<ObjectTypeOptions<Types, ImplementableObjectRef<Types, Shape, Parent>, Parent, Interfaces>, "name">): PothosSchemaTypes.ObjectRef<Types, Shape, Parent>;
}
//# sourceMappingURL=object.d.ts.map