DVGraphQL class

The schema registry and executor.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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

Static Properties

autoMaxCost → int
The cost budget maxCost: auto derives from the registered schema at the current DVGraphQLLimits.defaultPageSize.
no setter
autoMaxDepth → int
The depth budget maxDepth: auto derives from the registered schema.
no setter
limits ↔ DVGraphQLLimits
The depth, cost and introspection budget every operation is checked against before any resolver runs. On by default: a generated endpoint is public from its first deploy.
getter/setter pair
persistedQueries ↔ DVPersistedQueries
The persisted-query manifest and whether it is enforced.
getter/setter pair

Static Methods

analyze(String document, {Map<String, Object?>? variables, String? operationName}) → DVGraphQLQueryCost
The depth and cost document is priced at, without running it.
authorizeModel(String action, {Object? resource, Object? user}) → Future<void>
Refuses with DVGraphQLForbidden unless the policy for action, named as Resource.action, allows it on resource.
execute(String document, {Map<String, Object?>? variables, String? operationName, String? persistedQueryHash, bool authenticated = false}) → Future<Map<String, Object?>>
Executes document, returning the spec-shaped {data} or {errors}.
executeRequest(Object? body, {bool authenticated = false}) → Future<Map<String, Object?>>
Runs a decoded GraphQL-over-HTTP request body: query, variables, operationName, and the persisted-query hash at extensions.persistedQuery.sha256Hash.
introspectionSchema() → Map<String, Object?>
The introspection document, in the shape GraphQL clients expect.
registerMutation(DVGraphQLField field) → void
registerQuery(DVGraphQLField field) → void
registerSubscription(DVGraphQLField field) → void
Registers a subscription. Its resolver returns a Stream; each event becomes one {data} payload shaped by the client's selection set.
registerType(DVGraphQLObjectType type) → void
reset() → void
Drops every registration, and puts the limits and the persisted-query manifest back to their defaults. Intended for tests.
subscribe(String document, {Map<String, Object?>? variables, String? operationName, String? persistedQueryHash, bool authenticated = false}) → Stream<Map<String, Object?>>
Runs a subscription, yielding one spec-shaped result per event.
subscribeRequest(Object? body, {bool authenticated = false}) → Stream<Map<String, Object?>>
executeRequest for a subscription, as /graphql/stream reads it.
toSdl() → String
The schema as SDL, for humans and for tooling that prefers it to an introspection round trip.
typeNamed(String name) → DVGraphQLObjectType?
typeReference(String type) → Map<String, Object?>
An SDL type string as an introspection type reference.