You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
We have been using this client on a local neo4j instance and have upgraded to Neo4j's hosted Aura database instead. Aura appears to only support the neo4j+s bolt protocol, and I am getting a messages that the protocol is not supported by Neo4jClient. Is that correct and the client won't work with Aura or am I doing something wrong? Here is how I am injecting the client into the dependency injection container:
services.AddSingleton(context =>{varpath=config.GetValue<string>("Neo4j:Path");if(!path.StartsWith("http")&&!path.StartsWith("neo4j"))// note with aura db this condition would not be met (starts with neo4j+s){path=$"http://{path}:7474";// add the neo4j protocol and port if it isn't provided}returnNeoServerConfiguration.GetConfigurationAsync(newUri(path),config.GetValue<string>("Neo4j:User"),config.GetValue<string>("Neo4j:Password")).GetAwaiter().GetResult();});services.AddSingleton<IGraphClientFactory,GraphClientFactory>();
The text was updated successfully, but these errors were encountered:
and then injecting IBoltGraphClient instead of IGraphClientFactory. Unfortunately, if the BoltGraphClient gets disposed, the underlying driver is disposed also. So it doesn't look like I can reuse the GraphDatabase.Driver and have to register it as Scoped instead of a Singleton.
I have run into the same issue working with Aura DB.
@mcalvin-kinectify for my understanding/curiosity, the issue with a Scoped lifetime is that you have to call BoltGraphClient.ConnectAsync with each connection, right?
Hello,
We have been using this client on a local neo4j instance and have upgraded to Neo4j's hosted Aura database instead. Aura appears to only support the neo4j+s bolt protocol, and I am getting a messages that the protocol is not supported by Neo4jClient. Is that correct and the client won't work with Aura or am I doing something wrong? Here is how I am injecting the client into the dependency injection container:
The text was updated successfully, but these errors were encountered: