graphql-composer
Version:
Create your GraphQL API using composition!
17 lines (16 loc) • 979 B
TypeScript
import { GraphQLArgument, InputValueDefinitionNode } from "graphql";
import { InputFieldType, StringKeyOf, InputField, Field } from "../..";
import { GQLField } from "./GQLField";
export declare class Arg<NameType = string, ExtensionsType = any> extends GQLField<GraphQLArgument, NameType, ExtensionsType> {
protected _defaultValue: string | number | boolean;
protected _type: InputFieldType;
get type(): InputFieldType;
get definitionNode(): InputValueDefinitionNode;
protected constructor(name: NameType & string, type: InputFieldType);
static create<NameType = any>(name: StringKeyOf<NameType>, type: InputFieldType): Arg<StringKeyOf<NameType>>;
static create<NameType = any>(field: InputField<any>): Arg<StringKeyOf<NameType>>;
static create<NameType = any>(arg: Arg<any>): Arg<StringKeyOf<NameType>>;
static create<NameType = any>(field: Field<any>): Arg<StringKeyOf<NameType>>;
build(): GraphQLArgument;
copy(): Arg<NameType>;
}