UNPKG

graphql-composer

Version:
21 lines (20 loc) 1.08 kB
import { GraphQLInputField, InputValueDefinitionNode } from "graphql"; import { InputFieldType, StringKeyOf, Field, Arg } from "../.."; import { GQLField } from "./GQLField"; export declare class InputField<NameType = string, ExtensionsType = any> extends GQLField<GraphQLInputField, NameType, ExtensionsType> { protected _defaultValue: string | number | boolean; protected _type: InputFieldType; get type(): InputFieldType; get definitionNode(): InputValueDefinitionNode; protected constructor(name: NameType & string, type: InputFieldType); /** * Create a field for an InputType */ static create<NameType = any>(name: StringKeyOf<NameType>, type: InputFieldType): InputField<StringKeyOf<NameType>>; static create<NameType = any>(field: Field<any>): InputField<StringKeyOf<NameType>>; static create<NameType = any>(field: InputField<any>): InputField<StringKeyOf<NameType>>; build(): GraphQLInputField; copy(): InputField<NameType>; convert(to: typeof Arg): Arg<NameType>; convert(to: typeof Field): Field<NameType>; }