GraphApiConfiguration.withInMemoryRepository constructor

GraphApiConfiguration.withInMemoryRepository({
  1. String? path,
})

Create a configuration with an in-memory repository for testing/demos.

This uses the default InMemoryRepository with NodeQueryBuilder which is suitable for development, testing, and demos.

Implementation

factory GraphApiConfiguration.withInMemoryRepository({String? path}) {
  final repository = InMemoryRepository<Node>(
    queryBuilder: NodeQueryBuilder(),
    path: path ?? 'nodes',
  );
  return GraphApiConfiguration(repository: repository);
}