You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p>Ok, we are off to a start with Dgraph and GraphQL+-. Let’s move it up
567
574
a few notches.</p>
568
-
<p>Dgraph can also do query aggregation, geo-queries, string querying and more. But for all that let's move from the small datasets we started with and try out something bigger, much bigger.</p>
569
-
<p>In our github repository you'll find a <ahref="https://github.com/dgraph-io/benchmarks/blob/master/data/goldendata.rdf.gz">dataset about movies, directors
575
+
<p>Dgraph can also do query aggregation, geo-queries, string querying and more. But for all that let’s move from the small datasets we started with and try out something bigger, much bigger.</p>
576
+
<p>In our github repository you’ll find a <ahref="https://github.com/dgraph-io/benchmarks/blob/master/data/goldendata.rdf.gz">dataset about movies, directors
570
577
and actors</a>.</p>
571
578
<p>Download it from that link or with something like</p>
<description>Ok, we are off to a start with Dgraph and GraphQL+-. Let’s move it up a few notches.
21
-
Dgraph can also do query aggregation, geo-queries, string querying and more. But for all that let's move from the small datasets we started with and try out something bigger, much bigger.
22
-
In our github repository you'll find a dataset about movies, directors and actors.
21
+
Dgraph can also do query aggregation, geo-queries, string querying and more. But for all that let&rsquo;s move from the small datasets we started with and try out something bigger, much bigger.
22
+
In our github repository you&rsquo;ll find a dataset about movies, directors and actors.
23
23
Download it from that link or with something like</description>
24
24
</item>
25
25
@@ -30,7 +30,7 @@ Download it from that link or with something like</description>
<p>Let’s have a look at a hello world query in GraphQL+-.</p>
575
582
<p>Every query has a name, and the result is labelled with the same name.</p>
576
-
<p>The search criteria <code>func: ...</code> matches nodes. Function <code>eq</code> does what you'd expect, matching nodes with a <code>name</code> equalling “Michael”. The result is the matched nodes
583
+
<p>The search criteria <code>func: ...</code> matches nodes. Function <code>eq</code> does what you’d expect, matching nodes with a <code>name</code> equalling “Michael”. The result is the matched nodes
577
584
and listed outgoing edges from those nodes.</p>
578
-
<p>Dgraph identifies each node with a unique internal id, its UID. A UID is not an edge, but can it be returned in a query with <code>uid</code>. If you already know a node's UID, it can be retrieved with <code>func: uid(<uid-number>)</code>.</p>
585
+
<p>Dgraph identifies each node with a unique internal id, its UID. A UID is not an edge, but can it be returned in a query with <code>uid</code>. If you already know a node’s UID, it can be retrieved with <code>func: uid(<uid-number>)</code>.</p>
579
586
<p>Something to try : Change the query to select someone else.
580
587
You can check the <ahref="../../intro/4">sample data</a> again.</p>
<p>Given what you've seen so far, you've probably already understood this, but it's worth going over.</p>
567
-
<p>The graphs in Dgraph can be huge, so starting searching from all nodes isn't efficient. Dgraph needs a place to start searching, that's the root node.</p>
568
-
<p>At root, we use <code>func:</code> and a function to find an initial set of nodes. So far we've used <code>eq</code> and <code>allofterms</code> for string search, but we can also search on other values like dates, numbers, and also filters on <code>count</code>.</p>
573
+
<p>Given what you’ve seen so far, you’ve probably already understood this, but it’s worth going over.</p>
574
+
<p>The graphs in Dgraph can be huge, so starting searching from all nodes isn’t efficient. Dgraph needs a place to start searching, that’s the root node.</p>
575
+
<p>At root, we use <code>func:</code> and a function to find an initial set of nodes. So far we’ve used <code>eq</code> and <code>allofterms</code> for string search, but we can also search on other values like dates, numbers, and also filters on <code>count</code>.</p>
569
576
<p>Dgraph needs to build an index on values that are to be searched in this way because, without an index to make the search efficient, Dgraph would have to trawl through the whole database to find matching values.</p>
570
577
<p>From the set of nodes matched in the root filter, Dgraph then follows edges to satisfy the remainder of the query. The filters on blocks inside the root are only applied to the nodes reached by following listed edges to them.</p>
571
-
<p>The root <code>func:</code> only accepts a single function and doesn't accept <code>AND</code>, <code>OR</code> and <code>NOT</code> connectives as in filters. So the syntax <code>query_name(func: foo(...)) @filter(... AND ...) {...}</code> is required when further filtering on the elements returned by the root function is required.</p>
578
+
<p>The root <code>func:</code> only accepts a single function and doesn’t accept <code>AND</code>, <code>OR</code> and <code>NOT</code> connectives as in filters. So the syntax <code>query_name(func: foo(...)) @filter(... AND ...) {...}</code> is required when further filtering on the elements returned by the root function is required.</p>
572
579
<p>Something to try: Find all people who are in their 20s, and have at least 2 friends.
0 commit comments