GraphQLDataProvider<T> class

Adapter for querying GraphQL APIs for MetaMantle dynamic SEO.

Implemented types

Constructors

GraphQLDataProvider({required Uri endpoint, required String queryBuilder(RouteDataContext context), required JsonEntityMapper<T> mapper, Client? client, Map<String, String> headers = const {}, Duration timeout = const Duration(seconds: 10), int maxResponseSizeBytes = 5 * 1024 * 1024, String entityTag = 'graphql_api', SsrfGuard ssrfGuard = const SsrfGuard()})

Properties

client → Client
final
endpoint → Uri
final
entityTag → String
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>
final
mapper → JsonEntityMapper<T>
final
maxResponseSizeBytes → int
final
queryBuilder → String Function(RouteDataContext context)
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
ssrfGuard → SsrfGuard
final
timeout → Duration
final

Methods

load(RouteDataContext context) → Future<DataProviderResult<T>>
Loads typed data for the given context.
override
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