Have been reading the Dgraph C# client documentation to begin interrogating the server. To create a client you have to do the following based on docs (LINK):
var client = new DgraphClient(new Channel("127.0.0.1:9080", ChannelCredentials.Insecure));
Unfortunatly, DgraphClient constructor specified in the Dgrapg nuget 21.3.1.2 wants the following:
public DgraphClient(params GrpcChannel[] channels);
So I tried the following based on what the client class expects:
var _client = new DgraphClient(GrpcChannel.ForAddress("http://127.0.0.1:9080", new GrpcChannelOptions()
{
Credentials = Grpc.Core.ChannelCredentials.Insecure
}));
But I never successfully connect. I get the following error:
{ExceptionalError with Message='Status(StatusCode=Internal, Detail="Error starting gRPC call: An error occurred while sending the request.")', Exception='Grpc.Core.RpcException: Status(StatusCode=Internal, Detail="Error starting gRPC call: An error occurred while sending the request.")
at Dgraph.DgraphClient.<>c__DisplayClass6_0.<<Alter>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at Dgraph.DgraphClient.DgraphExecute[T](Func`2 execute, Func`2 onFail)'}
Are the docs wrong? Have not found a way to connect to dgraph in c# yet. I’m in a .NET Core project.