Moved API level usage of internal class GraphDatabaseAPI into internals.