import { GraphQLSchema } from "https://dotland.deno.dev/x/graphql_deno@v15.0.0/lib/index.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
astNode: Maybe<SchemaDefinitionNode>
extensionASTNodes: Maybe<ReadonlyArray<SchemaExtensionNode>>
Methods
getDirective(name: string): Maybe<GraphQLDirective>
getDirectives(): ReadonlyArray<GraphQLDirective>
getImplementations(interfaceType: GraphQLInterfaceType): InterfaceImplementations
getMutationType(): Maybe<GraphQLObjectType>
getPossibleTypes(abstractType: GraphQLAbstractType): ReadonlyArray<GraphQLObjectType>
getQueryType(): Maybe<GraphQLObjectType>
getSubscriptionType(): Maybe<GraphQLObjectType>
getType(name: string): Maybe<GraphQLNamedType>
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; }