TSchemaDocument.SetResolver Method
Overloads
- TSchemaDocument.SetResolver(string, string, IFieldResolver)
- TSchemaDocument.SetResolver(string, string, TFieldResolverFunc)
TSchemaDocument.SetResolver(string, string, IFieldResolver)
Sets the resolver for a field in an object type.
Remarks
If an object type with the specified name does not exist in schema, or if a field with the specified name doesn not exist in the object type, an exception will be raised.
Syntax
Unit: GraphQL.Schema
procedure TSchemaDocument.SetResolver(const ObjectTypeName: string; const FieldName: string; Resolver: IFieldResolver); overload;
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
const | ObjectTypeName | string | The name of the object type holding the field. |
const | FieldName | string | The name of the field which resolver will be set. |
Resolver | IFieldResolver | The field resolver interface to be set for the field. |
See also
TSchemaDocument.SetResolver(string, string, TFieldResolverFunc)
Sets the resolver for a field in an object type.
Remarks
If an object type with the specified name does not exist in schema, or if a field with the specified name doesn not exist in the object type, an exception will be raised.
Syntax
Unit: GraphQL.Schema
procedure TSchemaDocument.SetResolver(const ObjectTypeName: string; const FieldName: string; Func: TFieldResolverFunc); overload;
Parameters
<-> | Parameter | Type | Description |
---|---|---|---|
const | ObjectTypeName | string | The name of the object type holding the field. |
const | FieldName | string | The name of the field which resolver will be set. |
Func | TFieldResolverFunc | The anonymous function which will be executed to resolve the field. |