TSchemaDocument Class
Holds information about the GraphQL schema.
Remarks
A schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.
Syntax
Unit: GraphQL.Schema
TSchemaDocument = class(TObject);
Methods
| Name | Description | 
|---|---|
| Add | Adds a type to the schema. | 
| FindType | Returns an existing type with the specified name. | 
| GetType | Returns an existing type with the specified name. | 
| FindDirective | Returns an existing directive with the specified name. | 
| AddDirective | Adds a new directive to the schema. | 
| SetResolver | Overloaded SetResolver(string, string, IFieldResolver) SetResolver(string, string, TFieldResolverFunc)  | 
| SetTypeResolver | Overloaded SetTypeResolver(string, ITypeResolver) SetTypeResolver(string, TTypeResolverFunc)  | 
| Bind | Binds an existing object type to a class. | 
Properties
| Name | Description | 
|---|---|
| Initialized | Indicates if the schema was properly initialized. | 
| TypeCount | Returns the number of types registered in this schema. | 
| Types[Index] | Returns the type at the specified index. | 
| AllTypes | Returns an enumeration of all the graph types utilized by this schema. | 
| Query | The 'query' base graph type. Required. | 
| Mutation | The 'mutation' base graph type. | 
| Subscription | The 'subscription' base graph type. | 
| Directives | A collection of the available directives in schema. | 
| OnGlobalCreate | Fired every time a new TSchemaDocument is instantiated. |