Latest
class GraphQLSchema
import { GraphQLSchema } from "https://dotland.deno.dev/x/graphql_deno@v15.0.0/lib/type/schema.d.ts";

Schema Definition

A Schema is created by supplying the root types of each type of operation, query and mutation (optional). A schema definition is then supplied to the validator and executor.

Example:

const MyAppSchema = new GraphQLSchema({
  query: MyAppQueryRootType,
  mutation: MyAppMutationRootType,
})

Note: If an array of directives are provided to GraphQLSchema, that will be the exact list of directives represented and allowed. If directives is not provided then a default set of the specified directives (e.g. @include and

Constructors

new
GraphQLSchema(config: Readonly<GraphQLSchemaConfig>)

Properties

description: Maybe<string>
extensionASTNodes: Maybe<ReadonlyArray<SchemaExtensionNode>>
extensions: Maybe<Readonly<Record<string, any>>>

Methods

getImplementations(interfaceType: GraphQLInterfaceType): InterfaceImplementations
getTypeMap(): TypeMap
isPossibleType(abstractType: GraphQLAbstractType, possibleType: GraphQLObjectType): boolean
isSubType(abstractType: GraphQLAbstractType, maybeSubType: GraphQLNamedType): boolean
toConfig(): GraphQLSchemaConfig & { types: Array<GraphQLNamedType>; directives: Array<GraphQLDirective>; extensions: Maybe<Readonly<Record<string, any>>>; extensionASTNodes: ReadonlyArray<SchemaExtensionNode>; assumeValid: boolean; }