import { AllInputTypes, GetGen2 } from '../typegenTypeHelpers'; import { AllNexusArgsDefs, AllNexusInputTypeDefs } from './wrapping'; export declare type ArgsRecord = Record; export declare type CommonArgConfig = { /** * The description to annotate the GraphQL SDL */ description?: string | null; } & NexusGenPluginArgConfig; export interface ScalarArgConfig extends CommonArgConfig { /** * Configure the default for the object */ default?: T; } export declare type NexusArgConfigType = T | AllNexusInputTypeDefs; export interface NexusAsArgConfig extends CommonArgConfig { /** * Configure the default for the object */ default?: GetGen2<'allTypes', T>; } export interface NexusArgConfig extends NexusAsArgConfig { /** * The type of the argument, either the string name of the type, * or the concrete Nexus type definition */ type: NexusArgConfigType; } export interface NexusFinalArgConfig extends NexusArgConfig { configFor: 'arg'; argName: string; fieldName: string; parentType: string; } export declare class NexusArgDef { readonly name: string; protected config: NexusArgConfig; constructor(name: string, config: NexusArgConfig); get value(): NexusArgConfig; } /** * Defines an argument that can be used in any object or interface type * * Takes the GraphQL type name and any options. * * The value returned from this argument can be used multiple times in any valid `args` object value * * @see https://graphql.github.io/learn/schema/#arguments */ export declare function arg(options: NexusArgConfig): NexusArgDef; export declare function stringArg(options?: ScalarArgConfig): NexusArgDef<"String">; export declare function intArg(options?: ScalarArgConfig): NexusArgDef<"Int">; export declare function floatArg(options?: ScalarArgConfig): NexusArgDef<"Float">; export declare function idArg(options?: ScalarArgConfig): NexusArgDef<"ID">; export declare function booleanArg(options?: ScalarArgConfig): NexusArgDef<"Boolean">;