DVGraphQLField class

A resolvable field on a registered type.

Constructors

DVGraphQLField(String name, String type, {Map<String, String> args = const <String, String>{}, FutureOr<Object?> resolve(Map<String, Object?> args, Object? parent)?, int? cost, int? pageSize, String? policy})
const

Properties

args → Map<String, String>
Argument names to SDL types.
final
cost → int?
What resolving this field counts toward an operation's cost budget, before a list multiplies it. A field that resolves through a backend function declares what that function costs; absent, a field costs 1, and nothing costs less.
final
hashCode → int
The hash code for this object.
no setterinherited
name → String
final
pageSize → int?
The page size a list field is priced at when the query passes none. Absent, DVGraphQLLimits.defaultPageSize.
final
policy → String?
The Resource.action this field runs under -- for a field that resolves through a backend function, the action that function's route declares.
final
resolve → FutureOr<Object?> Function(Map<String, Object?> args, Object? parent)?
Resolves the field. parent is the enclosing object's resolved value (null at the root); absent, the field reads parent[name].
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
type → String
The SDL type, e.g. String!, [User!]!.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited