Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/drash/src/services/graphql/graphql.ts>GraphQL.GraphQLInputObjectType

A microframework for Deno's HTTP server with zero third-party dependencies
Go to Latest
class GraphQL.GraphQLInputObjectType
import { GraphQL } from "https://deno.land/x/drash@v2.8.1/src/services/graphql/graphql.ts";
const { GraphQLInputObjectType } = GraphQL;

Input Object Type Definition

An input object defines a structured collection of fields which may be supplied to a field argument.

Using NonNull will ensure that a value must be provided by the query

Example:

const GeoPoint = new GraphQLInputObjectType({
  name: 'GeoPoint',
  fields: {
    lat: { type: new GraphQLNonNull(GraphQLFloat) },
    lon: { type: new GraphQLNonNull(GraphQLFloat) },
    alt: { type: GraphQLFloat, defaultValue: 0 },
  }
});

Constructors

new
GraphQLInputObjectType(config: Readonly<GraphQLInputObjectTypeConfig>)

Properties

description: Maybe<string>
extensionASTNodes: Maybe<ReadonlyArray<InputObjectTypeExtensionNode>>
extensions: Maybe<Readonly<GraphQLInputObjectTypeExtensions>>
name: string

Methods

inspect(): string
toConfig(): GraphQLInputObjectTypeConfig & { fields: GraphQLInputFieldConfigMap; extensions: Maybe<Readonly<GraphQLInputObjectTypeExtensions>>; extensionASTNodes: ReadonlyArray<InputObjectTypeExtensionNode>; }
toJSON(): string
toString(): string