import { GraphQLInputObjectTypeConfig } from 'graphql'; import { NexusArgDef, NexusAsArgConfig } from './args'; import type { InputDefinitionBlock } from './definitionBlocks'; import { Maybe, NonNullConfig } from './_types'; export declare type NexusInputObjectTypeConfig = { /** Name of the input object type */ name: TypeName; /** Definition block for the input type */ definition(t: InputDefinitionBlock): void; /** The description to annotate the GraphQL SDL */ description?: Maybe; /** * Configures the nullability for the type, check the documentation's "Getting Started" section to learn * more about GraphQL Nexus's assumptions and configuration on nullability. */ nonNullDefaults?: NonNullConfig; /** * Custom extensions, as supported in graphql-js * * @see https://github.com/graphql/graphql-js/issues/1527 */ extensions?: GraphQLInputObjectTypeConfig['extensions']; /** Adds this type as a method on the Object/Interface definition blocks */ asNexusMethod?: string; } & NexusGenPluginInputTypeConfig; export declare class NexusInputObjectTypeDef { readonly name: TypeName; protected config: NexusInputObjectTypeConfig; constructor(name: TypeName, config: NexusInputObjectTypeConfig); get value(): NexusInputObjectTypeConfig; /** * Shorthand for wrapping the current InputObject in an "arg", useful if you need to add a description. * * @example * inputObject(config).asArg({ * description: 'Define sort the current field', * }) */ asArg(cfg?: NexusAsArgConfig): NexusArgDef; } export declare function inputObjectType(config: NexusInputObjectTypeConfig): NexusInputObjectTypeDef;