# \#example

**URL:** https://discuss.dgraph.io/tag/example/2.md

[Latest](https://discuss.dgraph.io/latest.md) · [Categories](https://discuss.dgraph.io/categories.md) · [Tags](https://discuss.dgraph.io/tags.md)

---

## [Status = StatusCode.UNAVAILABLE 	details = "failed to connect to all addresses"](https://discuss.dgraph.io/t/status-statuscode-unavailable-details-failed-to-connect-to-all-addresses/7281)

<div class="topic-metadata">

**Author:** [@gumupaier](https://discuss.dgraph.io/u/gumupaier)\
**Replies:** 2\
**Last updated:** [May 22, 2021, 2:27pm UTC](https://discuss.dgraph.io/t/status-statuscode-unavailable-details-failed-to-connect-to-all-addresses/7281 "2021-05-22T14:27:01Z")

</div>

hi The following error occurred while testing pydgraph Traceback (most recent call last): File "/Users/henson/PycharmProjects/personal/temp/dgraph/tls\_example.py", line 71, in \<module\> main() File "/Users/hens…

---

## [SELECT DISTINCT in Dgraph](https://discuss.dgraph.io/t/select-distinct-in-dgraph/7056)

<div class="topic-metadata">

**Author:** [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Replies:** 3\
**Last updated:** [April 18, 2021, 1:03am UTC](https://discuss.dgraph.io/t/select-distinct-in-dgraph/7056 "2021-04-18T01:03:10Z")

</div>

PS. I’m using v20.03.3 In SQL \<SLC DIST\> is limited to selecting values from a row that are not the same. In Dgraph, this concept changes a little bit. Since we don’t have columns and rows, not every SQL function make…

---

## [How to find nodes given an array of values](https://discuss.dgraph.io/t/how-to-find-nodes-given-an-array-of-values/3316)

<div class="topic-metadata">

**Author:** [@aryzing](https://discuss.dgraph.io/u/aryzing)\
**Replies:** 8\
**Last updated:** [January 16, 2021, 9:58pm UTC](https://discuss.dgraph.io/t/how-to-find-nodes-given-an-array-of-values/3316 "2021-01-16T21:58:47Z")

</div>

Is it possible to find all nodes matching a value within an array in a single query? For example, say our database contains nodes representing a business’ clients with properties name and email. We want to send an email…

---

## [One JS example with Dgraph-js for beginners. Using graphQL instead of REST](https://discuss.dgraph.io/t/one-js-example-with-dgraph-js-for-beginners-using-graphql-instead-of-rest/3277)

<div class="topic-metadata">

**Author:** [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Replies:** 0\
**Last updated:** [September 25, 2018, 12:57am UTC](https://discuss.dgraph.io/t/one-js-example-with-dgraph-js-for-beginners-using-graphql-instead-of-rest/3277 "2018-09-25T00:57:14Z")

</div>

The Repo https://github.com/MichelDiz/apollo-universal-starter-kit-With-Dgraph-DB It’s a kind of “reverse engineering for beginners”. Read the Readme completely to better understand the whole Kit. It’s functional, you c…

---

## [How to run the simple React Todo app without Slash?](https://discuss.dgraph.io/t/how-to-run-the-simple-react-todo-app-without-slash/9615)

<div class="topic-metadata">

**Author:** [@catherineluse](https://discuss.dgraph.io/u/catherineluse)\
**Replies:** 4\
**Last updated:** [August 22, 2020, 6:10pm UTC](https://discuss.dgraph.io/t/how-to-run-the-simple-react-todo-app-without-slash/9615 "2020-08-22T18:10:40Z")

</div>

I went through these steps to build a basic todo app with Dgraph and React: graphql-sample-apps/todo-app-react at master · dgraph-io/graphql-sample-apps · GitHub I did all the steps, but when I went to the UI, it prompt…

---

## [Improve example in readme](https://discuss.dgraph.io/t/improve-example-in-readme/9272)

<div class="topic-metadata">

**Author:** [@dhagrow](https://discuss.dgraph.io/u/dhagrow)\
**Replies:** 2\
**Last updated:** [August 7, 2020, 4:23pm UTC](https://discuss.dgraph.io/t/improve-example-in-readme/9272 "2020-08-07T16:23:40Z")

</div>

This example in the readme is written in a weird way for no apparent reason: txn = client.txn() try: # ... # Perform any number of queries and mutations # ... # and finally... txn.commit() except Exception as …

---

## [Updating graph using struct with uid makes edges disappear (dgo)](https://discuss.dgraph.io/t/updating-graph-using-struct-with-uid-makes-edges-disappear-dgo/7583)

<div class="topic-metadata">

**Author:** [@AugustDev](https://discuss.dgraph.io/u/AugustDev)\
**Replies:** 2\
**Last updated:** [July 7, 2020, 11:46am UTC](https://discuss.dgraph.io/t/updating-graph-using-struct-with-uid-makes-edges-disappear-dgo/7583 "2020-07-07T11:46:30Z")

</div>

Hi everyone, I have opened issue to this on dgo github, but I feel it will get more exposure here. The problem: updating a node causes loss of deeper nested edges using dgo. Graph before editing quote { "uid": "0x2a8…

---

## [Example of using go client to connect to Dgraph](https://discuss.dgraph.io/t/example-of-using-go-client-to-connect-to-dgraph/7213)

<div class="topic-metadata">

**Author:** [@trdeepak](https://discuss.dgraph.io/u/trdeepak)\
**Replies:** 4\
**Last updated:** [June 17, 2020, 1:55pm UTC](https://discuss.dgraph.io/t/example-of-using-go-client-to-connect-to-dgraph/7213 "2020-06-17T13:55:42Z")

</div>

Took me some time to figure out. Have combined codes from multiple sources. Can be used by beginners to learn client connection in go: package main import ( “context” “encoding/json” “fmt” “log” “time” “github.c…

---

## [Cypher "translated" to DQL (former GraphQL+-)](https://discuss.dgraph.io/t/cypher-translated-to-dql-former-graphql/5599)

<div class="topic-metadata">

**Author:** [@MichelDiz](https://discuss.dgraph.io/u/MichelDiz)\
**Replies:** 11\
**Last updated:** [June 9, 2020, 1:46am UTC](https://discuss.dgraph.io/t/cypher-translated-to-dql-former-graphql/5599 "2020-06-09T01:46:32Z")

</div>

Update: Dgraph have renamed its query language. It used to be called GraphQL±, and now it is DQL. Abstract In my humble opinion. Cypher is not Graphs friendly. But it’s not that hard to understand. It tries to maintai…

---

## [How to use javaclient excute delete edge](https://discuss.dgraph.io/t/how-to-use-javaclient-excute-delete-edge/6577)

<div class="topic-metadata">

**Author:** [@wangliujing](https://discuss.dgraph.io/u/wangliujing)\
**Replies:** 3\
**Last updated:** [May 4, 2020, 2:33am UTC](https://discuss.dgraph.io/t/how-to-use-javaclient-excute-delete-edge/6577 "2020-05-04T02:33:34Z")

</div>

Example: { delete { \<0x1\> \<\_follows\> \<0x2\> . } } use DgraphClient excute I invoke as follows @Test public void deleteEdge(){ String operatJson = "\\t{\\n" + "\\t\\tdelete {\\n" + "\\t\\t\\t\<0x1\> \<follows\> \<0…

---

## [Creating a constantly updated Read Replica with dgraph](https://discuss.dgraph.io/t/creating-a-constantly-updated-read-replica-with-dgraph/6579)

<div class="topic-metadata">

**Author:** [@gregberns](https://discuss.dgraph.io/u/gregberns)\
**Replies:** 3\
**Last updated:** [May 4, 2020, 2:18am UTC](https://discuss.dgraph.io/t/creating-a-constantly-updated-read-replica-with-dgraph/6579 "2020-05-04T02:18:17Z")

</div>

I heard about dgraph from the Changelog podcast a couple years ago and it came to mind now that we’re looking at DBs. We’d like to create a read replica off of our legacy database which you could think of as a document d…

---

## [Fetch based on last relation](https://discuss.dgraph.io/t/fetch-based-on-last-relation/6572)

<div class="topic-metadata">

**Author:** [@arkaroy](https://discuss.dgraph.io/u/arkaroy)\
**Replies:** 4\
**Last updated:** [May 2, 2020, 10:59am UTC](https://discuss.dgraph.io/t/fetch-based-on-last-relation/6572 "2020-05-02T10:59:44Z")

</div>

I am stuck in preparing query to fetch based on relation. I have a schema like this. title: string @index(exact) . actions: \[uid\] @reverse . phase: string @index(exact) . created\_at: datetime . type Job { title …

---

## [Best way to check if an edge exists between two nodes](https://discuss.dgraph.io/t/best-way-to-check-if-an-edge-exists-between-two-nodes/6529)

<div class="topic-metadata">

**Author:** [@milosgajdos](https://discuss.dgraph.io/u/milosgajdos)\
**Replies:** 3\
**Last updated:** [April 30, 2020, 9:45pm UTC](https://discuss.dgraph.io/t/best-way-to-check-if-an-edge-exists-between-two-nodes/6529 "2020-04-30T21:45:19Z")

</div>

I have come up with some madly elaborate ways to check if the edge between two nodes exists (direct or reverse), but I’m thinking there must be a better way. Right now I’m doing a weirdly elaborate query for both edge d…

---

## [Standard Deviation](https://discuss.dgraph.io/t/standard-deviation/6241)

<div class="topic-metadata">

**Author:** [@luke.daugherty](https://discuss.dgraph.io/u/luke.daugherty)\
**Replies:** 3\
**Last updated:** [April 30, 2020, 8:31pm UTC](https://discuss.dgraph.io/t/standard-deviation/6241 "2020-04-30T20:31:42Z")

</div>

I have been attempting to figure out how to calculate standard deviation but am having some issues. This example is calculating the std dev for the length of all tracks. The use case may not make much sense, but I am jus…

---

## [Using Dgraph GraphQL with attribute-based access control](https://discuss.dgraph.io/t/using-dgraph-graphql-with-attribute-based-access-control/6429)

<div class="topic-metadata">

**Author:** [@geoyws](https://discuss.dgraph.io/u/geoyws)\
**Replies:** 2\
**Last updated:** [April 29, 2020, 3:08am UTC](https://discuss.dgraph.io/t/using-dgraph-graphql-with-attribute-based-access-control/6429 "2020-04-29T03:08:08Z")

</div>

We were wondering how we could implement attribute-based access control https://arxiv.org/pdf/1909.09904.pdf together with Dgraph’s GraphQL API. If we did write our own resolvers, we may not be able to use Dgraph’s gener…

---

## [Query in tour of dgraph](https://discuss.dgraph.io/t/query-in-tour-of-dgraph/6395)

<div class="topic-metadata">

**Author:** [@milosgajdos](https://discuss.dgraph.io/u/milosgajdos)\
**Replies:** 2\
**Last updated:** [April 26, 2020, 8:12pm UTC](https://discuss.dgraph.io/t/query-in-tour-of-dgraph/6395 "2020-04-26T20:12:22Z")

</div>

I’m completely new to graph databases (not to graphs, though), but I’ve been spending a bit of time recently tinkering and learning about dgraph and I’ve come across a query in the Tour of Dgraph I don’t quite follow, mo…

---

## [Math() function does not work in the expected way in a specific scenario](https://discuss.dgraph.io/t/math-function-does-not-work-in-the-expected-way-in-a-specific-scenario/6351)

<div class="topic-metadata">

**Author:** [@shravan](https://discuss.dgraph.io/u/shravan)\
**Replies:** 13\
**Last updated:** [April 22, 2020, 5:30am UTC](https://discuss.dgraph.io/t/math-function-does-not-work-in-the-expected-way-in-a-specific-scenario/6351 "2020-04-22T05:30:57Z")

</div>

{ var(func: uid(0x001)){ user.details{ location as user.value } } …

---

## [How to use ludicrous mode](https://discuss.dgraph.io/t/how-to-use-ludicrous-mode/6308)

<div class="topic-metadata">

**Author:** [@Willem520](https://discuss.dgraph.io/u/Willem520)\
**Replies:** 4\
**Last updated:** [April 16, 2020, 4:06am UTC](https://discuss.dgraph.io/t/how-to-use-ludicrous-mode/6308 "2020-04-16T04:06:00Z")

</div>

Hi, I noticed ludicrous mode in v20.03.0. but there is no document about it. I want to know some thing about the new param. thx.

---

## [Graphql query -- how to use a type as filter?](https://discuss.dgraph.io/t/graphql-query-how-to-use-a-type-as-filter/6172)

<div class="topic-metadata">

**Author:** [@Wisgon](https://discuss.dgraph.io/u/Wisgon)\
**Replies:** 3\
**Last updated:** [March 26, 2020, 2:28am UTC](https://discuss.dgraph.io/t/graphql-query-how-to-use-a-type-as-filter/6172 "2020-03-26T02:28:06Z")

</div>

Hi, I use dgraph2.0 with graphql, and I had read about graphql doc In my pratice, I have a problem of querying that use other type as filter. For example, I have a schema like this: type User { name: String! @id …

---

## [Golang client with TLS](https://discuss.dgraph.io/t/golang-client-with-tls/6013)

<div class="topic-metadata">

**Author:** [@vladimir](https://discuss.dgraph.io/u/vladimir)\
**Replies:** 7\
**Last updated:** [February 27, 2020, 2:16pm UTC](https://discuss.dgraph.io/t/golang-client-with-tls/6013 "2020-02-27T14:16:38Z")

</div>

Can you help. How I can connect to my dgraph alpha using tls and golang client? Server ip 197.0.0.1 TLS key and crt in folder ./tls/ rw-rw-r-- 1 gigihont gigihont 1168 Feb 19 09:29 client.dgraphuser.crt -rw------- 1…

---

## [Errors Working Through Tutorials](https://discuss.dgraph.io/t/errors-working-through-tutorials/6039)

<div class="topic-metadata">

**Author:** [@mmcken3](https://discuss.dgraph.io/u/mmcken3)\
**Replies:** 1\
**Last updated:** [February 25, 2020, 5:17pm UTC](https://discuss.dgraph.io/t/errors-working-through-tutorials/6039 "2020-02-25T17:17:34Z")

</div>

I have been working through some of the tutorials on the site recently and most of the documentation makes sense to me. However, there are a few steps where when I run the examples locally I get some kind of schema or qu…

---

## [How to perform in query on Hash query](https://discuss.dgraph.io/t/how-to-perform-in-query-on-hash-query/5751)

<div class="topic-metadata">

**Author:** [@bqf9979](https://discuss.dgraph.io/u/bqf9979)\
**Replies:** 4\
**Last updated:** [January 6, 2020, 5:54pm UTC](https://discuss.dgraph.io/t/how-to-perform-in-query-on-hash-query/5751 "2020-01-06T17:54:10Z")

</div>

How to perform in query on Hash query? Just like in (“xxx1”, “XXX2”) in SQL statement, I can’t find relevant content in the document. Although regular query can replace it, I’m worried about efficiency

---

## [Example (DeleteNode) in dgo is wrong?](https://discuss.dgraph.io/t/example-deletenode-in-dgo-is-wrong/5469)

<div class="topic-metadata">

**Author:** [@UnaChen](https://discuss.dgraph.io/u/UnaChen)\
**Replies:** 4\
**Last updated:** [December 5, 2019, 2:03pm UTC](https://discuss.dgraph.io/t/example-deletenode-in-dgo-is-wrong/5469 "2019-12-05T14:03:06Z")

</div>

After executing this Example (DeleteNode), the target node haven’t been deleted and no error occurred. I checked the related source code about the following part in Example (DeleteNode). d := map\[string\]string{"uid": …

---

## [Dgraph graphql How to create new multiple nodes with edges to existing nodes?](https://discuss.dgraph.io/t/dgraph-graphql-how-to-create-new-multiple-nodes-with-edges-to-existing-nodes/5502)

<div class="topic-metadata">

**Author:** [@ubraga608](https://discuss.dgraph.io/u/ubraga608)\
**Replies:** 5\
**Last updated:** [November 28, 2019, 5:07pm UTC](https://discuss.dgraph.io/t/dgraph-graphql-how-to-create-new-multiple-nodes-with-edges-to-existing-nodes/5502 "2019-11-28T17:07:35Z")

</div>

I am referencing the example used in this blog post to base my question : http://dgraph.discourse.group/t/dgraph-tutorials-series-2-uid-operations-updating-nodes-and-traversals-dgraph-blog/5251 Assuming that currently we …

---

## [Recommended way of generating triples in the W3C standard RDF N-Quad format - with variables](https://discuss.dgraph.io/t/recommended-way-of-generating-triples-in-the-w3c-standard-rdf-n-quad-format-with-variables/5441)

<div class="topic-metadata">

**Author:** [@Mentioum](https://discuss.dgraph.io/u/Mentioum)\
**Replies:** 5\
**Last updated:** [November 17, 2019, 9:35am UTC](https://discuss.dgraph.io/t/recommended-way-of-generating-triples-in-the-w3c-standard-rdf-n-quad-format-with-variables/5441 "2019-11-17T09:35:14Z")

</div>

Hello everyone. The polite context to my question is at the bottom of this post but I’d like to value peoples time and put my question first. I’ve never worked with triples, or the RDF N-Quad format. I’ve been writing…

---

## [Get all predicates and their details](https://discuss.dgraph.io/t/get-all-predicates-and-their-details/5413)

<div class="topic-metadata">

**Author:** [@shahaan\_ali](https://discuss.dgraph.io/u/shahaan_ali)\
**Replies:** 1\
**Last updated:** [November 13, 2019, 4:17pm UTC](https://discuss.dgraph.io/t/get-all-predicates-and-their-details/5413 "2019-11-13T16:17:31Z")

</div>

Hi, I want to get all the predicates and their detail info instead of giving the specific predicates. Is it possible? What I am doing is { bd(func: eq(name, ‘Abc’)) @filter(eq(age, 24)) { name age fol…

---

## [How to shutdown zero node graceful](https://discuss.dgraph.io/t/how-to-shutdown-zero-node-graceful/5386)

<div class="topic-metadata">

**Author:** [@Willem520](https://discuss.dgraph.io/u/Willem520)\
**Replies:** 2\
**Last updated:** [November 12, 2019, 2:51am UTC](https://discuss.dgraph.io/t/how-to-shutdown-zero-node-graceful/5386 "2019-11-12T02:51:36Z")

</div>

I want to know to shutdown zero node.I used v1.1.0, but it has not the shutdown method like alpha

---

## [Do we have any more examples of making a complex schema's in pydgraph?](https://discuss.dgraph.io/t/do-we-have-any-more-examples-of-making-a-complex-schemas-in-pydgraph/5372)

<div class="topic-metadata">

**Author:** [@shahaan\_ali](https://discuss.dgraph.io/u/shahaan_ali)\
**Replies:** 2\
**Last updated:** [November 7, 2019, 11:52am UTC](https://discuss.dgraph.io/t/do-we-have-any-more-examples-of-making-a-complex-schemas-in-pydgraph/5372 "2019-11-07T11:52:55Z")

</div>

Hi, I am learning dgraph and it looks appealing to me. Right now what I want is to make a schema of a system like for different social media platforms having the individual nodes of each user (with details of user) for…

---

## [Summing over facets](https://discuss.dgraph.io/t/summing-over-facets/5221)

<div class="topic-metadata">

**Author:** [@StrangerDanger](https://discuss.dgraph.io/u/StrangerDanger)\
**Replies:** 2\
**Last updated:** [October 12, 2019, 3:20am UTC](https://discuss.dgraph.io/t/summing-over-facets/5221 "2019-10-12T03:20:27Z")

</div>

Hi, I have been running into this issue where I can’t seem to correctly query for the sum of the facets for multiple nodes. For a minimal example: https://docs.dgraph.io/query-language/#facets-and-aggregation Here, inst…

---

## [Is Dgraph Schemaless?](https://discuss.dgraph.io/t/is-dgraph-schemaless/5182)

<div class="topic-metadata">

**Author:** [@ASRRAJ](https://discuss.dgraph.io/u/ASRRAJ)\
**Replies:** 3\
**Last updated:** [October 4, 2019, 9:13am UTC](https://discuss.dgraph.io/t/is-dgraph-schemaless/5182 "2019-10-04T09:13:28Z")

</div>

I am newbie to dgraph and wanted to understand how can i load data into the dgraph without having schema in place ?

[Next page](https://discuss.dgraph.io/tag/example/2.md?match_all_tags=true&page=1&tags%5B%5D=example)
