Slash Graphql + Elixir

Hi! I really want to use Dgraph, but I’m having trouble getting the Elixir client to connect to Slash - it’s a long shot, but wanted to ask if anyone could take a look and see what’s missing:

It requires a host and a port for which I’ve tried a few like:

hostname: “subdomain.us-east-1.aws.cloud.dgraph.io”, port: 9080

Did you switch your backend mode to Flexible?

@chewxy yes :slight_smile:

the correct connection is : subdomain.grpc.us-east-1.aws.cloud.dgraph.io:443

You will need a client API key, and the rest is your bog standard gRPC things

Tried that with no luck - here the response I’m seeing:

Dlex.Protocol (#PID<0.414.0>) failed to connect: ** (Dlex.Error) connect failed with "Error when opening connection: :timeout"

What I’m getting back:

%Dlex.Protocol{
  adapter: Dlex.Adapters.GRPC,
  channel: %GRPC.Channel{
    accepted_compressors: [],
    adapter: GRPC.Adapter.Gun,
    adapter_payload: %{conn_pid: #PID<0.422.0>},
    codec: GRPC.Codec.Proto,
    compressor: nil,
    cred: %GRPC.Credential{
      ssl: [
        cacertfile: 'priv/cert/client.crt',
        certfile: 'priv/cert/client.csr',
        keyfile: 'priv/cert/client.key'
      ]
    },
    headers: [{"x-auth-token", "token"}],
    host: "subdomain.grpc.us-east-1.aws.cloud.dgraph.io",
    interceptors: [],
    port: 443,
    scheme: "https"
  },
  connected: nil,
  json: Jason,
  opts: [
    pool_index: 1,
    json_library: Jason,
    idle_interval: 15000,
    keepalive: :infinity,
    timeout: 15000,
    connect_timeout: 15000,
    transport: :grpc,
    name: Home.Repo,
    hostname: "subdomain.grpc.us-east-1.aws.cloud.dgraph.io",
    port: 443,
    keyfile: "priv/cert/client.key",
    certfile: "priv/cert/client.csr",
    cacertfile: "priv/cert/client.crt",
    headers: [{"x-auth-token", "token"}]
  ],
  txn_aborted?: false,
  txn_context: nil
}

cc: @liveforeverx

um, wait did you literally use subdomain.grpc.us-east-1.aws.cloud.dgraph.io ?

You should use the endpoint URI that you get from Slash. Just add a .grpc between the name and the AWS location

1 Like

no :laughing: I removed the subdomain and the token

I think I’ve made some progress. The changes I’m making appear under https://play.dgraph.io/, but not slash.dgraph.io - I can browse the schema, make queries,etc in Ratel but the Slash dashboard is completely blank?

Slash Dashboard? Do you want to jump on a call? If you screenshare I’d be able to see what’s happening and help you debug.