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
1 answer

Composite index in Dgraph?

type Species { name: String! @id animals: [Animal!]! @hasInverse(field: species) } type Animal { name: String! species: Species! } How do I make animal name unique within species? So that I can allow only one dog named Bob, but…
beardeadclown
  • 327
  • 2
  • 14
0
votes
1 answer

CORS Error with dgraph and apollo graphql

I am unable to run query requests with my local dGraph server. I am running dGraph using docker compose with both zero and alpha React client side frontend using apollo-client graphql for running queries. dGraph starts up fine, I have connected…
user3206236
  • 315
  • 5
  • 14
0
votes
1 answer

Dql mutation add duplicate records

What I want to do Prevent the dql mutation to add duplicates records What I did I add a graphql schema: type Product { id: ID! name: String! @id @dgraph(pred: "Product.name") slug: String! @id @dgraph(pred: "Product.slug") image:…
Panagiotis Koursaris
  • 3,794
  • 4
  • 23
  • 46
0
votes
1 answer

Dgraph data is not accessible via graphql if added via DQL mutation

What I want to do Add data using DQL mutation https://github.com/dgraph-io/dgo#running-a-mutation and these data to also be visible via graphql. Dgraph version: v21.03.2 DQL schema: : datetime . : string…
Panagiotis Koursaris
  • 3,794
  • 4
  • 23
  • 46
0
votes
1 answer

Multiple $PORT on Heroku Docker deployment

The current deployment Dockerfile contains this CMD ["sh","-c","dgraph zero --my=0.0.0.0:5080 & dgraph alpha --my=0.0.0.0:7080 --zero=0.0.0.0:5080"] However since Heroku dynamically allocates ports, they recommend the $PORT variable. But when…
Arya Lisa
  • 5
  • 1
0
votes
1 answer

Failed to install Dgraph. Got "Error while dialing dial tcp: lookup dgraph-zero-0.dgraph-zero.hm.svc.cluster.local: no such host"

I am trying to install Dgraph. Here is what I did: I created a dev cluster by k3d by k3d cluster create dev --config=dev-cluster-config.yaml dev-cluster-config.yaml file: apiVersion: k3d.io/v1alpha2 kind: Simple kubeAPI: hostPort: "6440" network:…
Hongbo Miao
  • 45,290
  • 60
  • 174
  • 267
0
votes
1 answer

How to update nodes in Dgraph using Python

My schema is: schema = """id: int @index(int) . question: string . answer: string . creation_time: int . interval_time: int . box_id: int . type Card { …
wileni
  • 25
  • 7
0
votes
1 answer

Many to many with pivot data to dgraph using graphql schema

I have the bellow many to many relation using a relational DB and I want to transition this to the dgraph DB. This relation has also extra columns in the pivot table: products_stores like price, disc_price. I have the bellow dgraph schema using…
Panagiotis Koursaris
  • 3,794
  • 4
  • 23
  • 46
0
votes
1 answer

What is meant by fan-out in entity-relationships graph databases?

In the Dgraph paper, it is mentioned that entities are sharded randomly across servers and they carry relationships with other entities with themselves. This results in a high fan-out result set in intermediate steps of a graph query causing…
Aviral Srivastava
  • 4,058
  • 8
  • 29
  • 81
0
votes
0 answers

Inserting GraphQL record from JSON payload

I’m working on building an SMS platform, so part of this is for the SMS gateway to forward the SMS to a public URL with a JSON Payload (which I have no control of the format) so I need to have it accepted by a lambda in Slash GraphQL and then from…
quarks
  • 33,478
  • 73
  • 290
  • 513
0
votes
1 answer

defining a GraphQL mutation in DGraph that adds a node that is of union type within another node

I am new to GraphQL and Dgraph and have been reading through the manual. I am following an example in the manual posted here: https://dgraph.io/docs/graphql/schema/types/#union-type I am seeking to use a mutation to add a node or list of Nodes and…
Toby Derrum
  • 299
  • 1
  • 3
  • 22
0
votes
0 answers

todo list optimistic subscription updates with Apollo GraphQl

I am trying to get an optimistic response when I add a task to my todo list: ADD_TASK and GET_TASK from query.ts export const GET_TASKS = gql` subscription { queryTask { id title completed user { username …
Jonathan
  • 3,893
  • 5
  • 46
  • 77
0
votes
1 answer

In a graph db, is there a limit on how many node labels you can have?

I'm considering making hundreds of thousands of nodes with their own labels and connecting them to each other via millions of edges. Has this sort of thing been benchmarked anywhere with Neo4j, Dgraph, or any other graph db?
corysimmons
  • 7,296
  • 4
  • 57
  • 65
0
votes
1 answer

How to get a substring in dgraph query

When I perform this query { message (func: uid(0x4e22)) { message } } I get the response { "data": { "message": [ { "message": "really long message really long message really long message really long message really long…
Hymns For Disco
  • 7,530
  • 2
  • 17
  • 33
0
votes
1 answer

when is dgraph going to support Gremlin

In the FAQ on the documentation site there is a question about Gremlin support: When id dgrpah going to support gremlin The answer is after v1.0 but as we're way past this version I was wondering if this is in the works or was abandoned altogether
Micha Roon
  • 3,957
  • 2
  • 30
  • 48