TSchemaDocumentHelper.Parse Method
Creates a new schema document from a GraphQL type definition document.
Syntax
Unit: GraphQL.Helpers
class function TSchemaDocumentHelper.Parse(const Document: string; SchemaClass: TSchemaDocumentClass = nil): TSchemaDocument;
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
const | Document | string | The GraphQL document to be parsed. |
SchemaClass | TSchemaDocumentClass | Optional: Default value is nil The class of TSchemaDocument to be instantiated. If nil, a TSchemaDocument will be created. |
Returns
If the parsing succeeds, a new schema document instance is created, and returned. The schema document will hold all the proper objects represending the elements declared in the document (types, fields, directives, etc.). It's up to the caller to destroy the schema document instance.