graphRead method

Future<GraphReadOut?> graphRead({
  1. String? entity,
  2. String? relation,
  3. String? value,
  4. String? asOf,
  5. int? limit,
})

Read the assertions this organization has recorded

Parameters:

  • String entity: Entity narrows to what was asserted ABOUT one entity. Absent matches every entity.

  • String relation: Relation narrows to one relation. Absent matches every relation.

  • String value: Value narrows to assertions pointing AT one value, which is how the edges into an entity are read.

  • String asOf: AsOf bounds the read to what was knowable at an instant, RFC 3339. Absent reads everything this plane holds.

  • int limit: Limit caps how many assertions come back. Absent, zero, or anything above the walk ceiling is the ceiling.

Implementation

Future<GraphReadOut?> graphRead({ String? entity, String? relation, String? value, String? asOf, int? limit, }) async {
  final response = await graphReadWithHttpInfo( entity: entity, relation: relation, value: value, asOf: asOf, limit: limit, );
  if (response.statusCode >= HttpStatus.badRequest) {
    throw ApiException(response.statusCode, await _decodeBodyBytes(response));
  }
  // When a remote server returns no body with a status of 204, we shall not decode it.
  // At the time of writing this, `dart:convert` will throw an "Unexpected end of input"
  // FormatException when trying to decode an empty string.
  if (response.body.isNotEmpty && response.statusCode != HttpStatus.noContent) {
    return await apiClient.deserializeAsync(await _decodeBodyBytes(response), 'GraphReadOut',) as GraphReadOut;

  }
  return null;
}