@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
20 lines (19 loc) • 1.2 kB
TypeScript
import { type InputFieldMap, type InputFieldsFromShape, type InputRef, inputShapeKey, type PothosInputObjectTypeConfig, type SchemaTypes } from '../types/index.js';
import { BaseTypeRef } from './base.js';
import type { InputFieldRef } from './input-field.js';
export declare class InputObjectRef<Types extends SchemaTypes, T> extends BaseTypeRef<Types, PothosInputObjectTypeConfig> implements InputRef<T>, PothosSchemaTypes.InputObjectRef<Types, T> {
kind: "InputObject";
$inferInput: T;
[inputShapeKey]: T;
private fields;
private fieldCbs;
constructor(name: string);
addFields(fields: () => InputFieldMap): void;
onField(cb: (name: string, ref: InputFieldRef<Types>) => void): void;
}
export declare class ImplementableInputObjectRef<Types extends SchemaTypes, T extends object, Resolved = T> extends InputObjectRef<Types, Resolved> {
builder: PothosSchemaTypes.SchemaBuilder<Types>;
constructor(builder: PothosSchemaTypes.SchemaBuilder<Types>, name: string);
implement(options: PothosSchemaTypes.InputObjectTypeOptions<Types, InputFieldsFromShape<Types, T, "InputObject">>): InputObjectRef<Types, Resolved>;
}
//# sourceMappingURL=input-object.d.ts.map