resolveViaServiceIndex<Value, Serialized> function
GraphQLFieldResolver<List<Value> , Serialized>
resolveViaServiceIndex<Value, Serialized>(
- Service<
dynamic, Value> service
A GraphQL resolver that index
es an Angel service.
The arguments passed to the resolver will be forwarded to the service, and the
service will receive Providers.graphql
.
Implementation
GraphQLFieldResolver<List<Value>, Serialized>
resolveViaServiceIndex<Value, Serialized>(Service<dynamic, Value> service) {
return (_, arguments) async {
var _requestInfo = _fetchRequestInfo(arguments);
var params = {'query': _getQuery(arguments), 'provider': Providers.graphQL}
..addAll(_requestInfo);
return await service.index(params);
};
}