Questions tagged [dgraph]

Dgraph is a free, open source graph database that uses a customised version of graphql as a query language. DO NOT USE this tag for general graphql questions nor for other graph DBs.

Dgraph is an open source, scalable, distributed and highly available graph database. It's sharded storage and query processing were specifically designed to minimize the number of network calls. The database server and tools, written in go, are open-sourced and available under AGPL v3.0. The query language is named GraphQL+- and is based on Facebook’s GraphQL.

The clients communicate with the server using Protocol Buffers over gRPC. In the current version (v1.0.11), the available official clients are limited to the languages Go, Java, Javascript and Python.

For more information check following FAQ topics:

Useful links

Related Tags

106 questions
0
votes
0 answers

Can't import google.golang.org/grpc and github.com/dgraph-io/dgo in Go code

I am trying to import github.com/dgraph-io/dgo and google.golang.org/grpc in my Go code. But when I save the file it gets removed. This is how I am trying : import ( "bytes" "encoding/json" "fmt" "io/ioutil" "net/http" …
rachana
  • 3,344
  • 7
  • 30
  • 49
0
votes
1 answer

Starting zero alpha and ratel in a single command e.g. in MacOSX and other environments

https://dgraph.io/tour/intro/2/ asks for three docker commands being run in different terminals: zero alpha ratel I'd rather start things from a single script dgraph within Mac OSX 10.3.6 and other environments and use e.g. the terminal app to…
Wolfgang Fahl
  • 15,016
  • 11
  • 93
  • 186
0
votes
3 answers

Dgraph always shows'Connection lost with alpha: 7080' error

I now use docker-compose to start Dgraph, but it always fails to start. The contents of docker-compose.yml are as follows: # This Docker Compose file can be used to quickly bootup Dgraph Zero # and Alpha in different Docker containers. # It mounts…
shaojie
  • 121
  • 1
  • 11
0
votes
2 answers

How to run Dgraph on bare-metal Kubernetes cluster

I am trying to setup Dgraph in HA Cluster but it won't deploy if no volumes are present. When directly applying the provided config on a bare-metal cluster won't work. $ kubectl get pod --namespace dgraph dgraph-alpha-0 0/1 …
uberrebu
  • 3,597
  • 9
  • 38
  • 73
0
votes
1 answer

Dgraph: Can't see API data in Console

I'm running a test Dgraph instance in a dgraph/standalone Docker container, using the github.com/dgraph-io/dgo/v200/protos/api API on port 9080 to write data, but can't see the changes in the Console on port 8000. Using the API to query the…
Schmike
  • 121
  • 1
  • 6
0
votes
1 answer

How to get Dgraph uid_in to use variable inputs

Im trying to change my DB engine to DGraph. Do I really need to change my aplication to use uid rather than using my current ID. I need to do a filter with multiple uid_in usages, and currently my application does this via an ID property. But it…
Ben
  • 1
  • 1
0
votes
1 answer

Identify the path in Graph traversing

In the graph database, I want to know from which route I traverse e.g. Path-1. a-1-2-3-4-5-b Path-2. a-1-2-7-4-5-b In both the above examples, it traverses from point a to point b through different routes. Here I want to identify from which route I…
0
votes
1 answer

Dgraph: create edge without prior knowledge of uid

I'm experimenting with dgraph and so far my biggest struggle is to create an edge between two objects without prior knowledge of their uids (for bulk loading). Example - let's have two types - parent and child, the only difference is that child is…
Libor
  • 79
  • 2
  • 10
0
votes
2 answers

Dgraph query with variable UID

The following code is intended to query a Dgraph server for the values associated with a specific node, similar to looking up a row by primary key in a relational database. const dgraph = require("dgraph-js"); const grpc = require("grpc"); const…
Mark
  • 1,128
  • 13
  • 21
0
votes
1 answer

How do you convert specific array values in a JSON response to be just the first value in the array?

(Note, Dgraph isn't required for this problem; it's just the tool I am using where I am encountering the problem) Let's say you have some structs type AccountSettings struct { Uid string `json:"uid"` DType string…
sdfsdf
  • 5,052
  • 9
  • 42
  • 75
0
votes
1 answer

Dgraph: Is it a best practice to always use omitempty in your Golang struct fields?

For example, there's this snippet in the dgo doc // If omitempty is not set, then edges with empty values (0 for int/float, "" for string, false // for bool) would be created for values not specified explicitly. type Person struct { Uid …
sdfsdf
  • 5,052
  • 9
  • 42
  • 75
0
votes
1 answer

Dgraph: How do you query for strings that start with a specific sequence of letters?

For example, let's say your database contains a bunch of People{ name } objects, and you want to find everyone whose name starts with the letter "H" or "Mi".
sdfsdf
  • 5,052
  • 9
  • 42
  • 75
0
votes
1 answer

What's a directive in Dgraph?

For example, in this section of A Tour of Dgraph # Define Directives and index industry: string @index(term) . boss_of: [uid] . name: string @index(exact, term) . works_for: [uid] .
sdfsdf
  • 5,052
  • 9
  • 42
  • 75
0
votes
2 answers

Graphql + Dgraph how to batch import json data?

I just started a trivial graphql schema: type Product { productID: ID! name: String @search(by: [term]) reviews: [Review] @hasInverse(field: about) } type Review { id: ID! about: Product! @hasInverse(field: reviews) by:…
Flavien Volken
  • 19,196
  • 12
  • 100
  • 133
0
votes
1 answer

Connecting remote Dgraph database from App written in Swift

I'm new to Swift but no so new to PHP, yet I have problem finding any instructions on how to connect to a remote Dgraph database, located on AWS. Any direction to a tutorial about how to get data from that type of DB would be appreciated. I tried…
AllMighty
  • 1
  • 1