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>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>
602
602
603
603
<p>Something to try: Find all people who are in their 20s, and have at least 2 friends.
604
+
604
605
<divclass="expandable">
605
606
<adata-action="toggle-expandable" href="#expand">
606
607
<iclass="fa fa-caret-down"></i> Show answer
607
608
</a>
608
-
<divclass="expandable-content"></p>
609
-
610
-
<pre><code>{
609
+
<divclass="expandable-content">
610
+
<pre><code>{
611
611
lots_of_friends(func: ge(count(friend), 2)) @filter(ge(age, 20) AND lt(age, 30)) {
<p>If you do the same mutation above but using the same predicates instead of unique one. You gonna override the Edge attribute. Line by line. So you must to use distinct predicates.</p>
<description>Note For the following queries to run, you should have loaded data in the [introduction](../../intro/3/). Let’s have a look at a hello world query in GraphQL+-.
20
+
<description>Note For the following queries to run, you should have loaded data in the introduction.
21
+
Let’s have a look at a hello world query in GraphQL+-.
21
22
Every query has a name, and the result is labelled with the same name.
22
23
The search criteria func: ... matches nodes. Function eq does what you&rsquo;d expect, matching nodes with a name equalling &ldquo;Michael&rdquo;. The result is the matched nodes and listed outgoing edges from those nodes.</description>
23
24
</item>
@@ -171,7 +172,8 @@ In the query below, Dgraph returns all Michael&rsquo;s friends, and only the
171
172
<description>The @normalize directive
172
173
returns only edges listed with an alias, and
173
174
flattens the result to remove nesting
174
-
Tip Aliased names can be the same as the original edge. </description>
175
+
Tip Aliased names can be the same as the original edge.
Copy file name to clipboardExpand all lines: published/blocksvars/1/index.html
+6-3Lines changed: 6 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -588,12 +588,15 @@
588
588
<h1class="lesson-heading">Multiple Named Query Blocks</h1>
589
589
590
590
<div>
591
-
<divclass="notices note" >
592
-
<spanclass="type">Note</span>
593
-
From now on, to run the queries, you'll need to have loaded the [million triple movie dataset](../../moredata/1/).
591
+
592
+
593
+
594
+
<divclass="notices note" >
595
+
<spanclass="type">Note</span><p>From now on, to run the queries, you’ll need to have loaded the <ahref="../../moredata/1/">million triple movie dataset</a>.</p>
594
596
595
597
</div>
596
598
599
+
597
600
<p>Queries can be issued as multiples.</p>
598
601
599
602
<p>For queries labelled <code>q1, ..., qn</code> issued as a multiple query block, the JSON
<li>for something extra, try using <code>since</code> to work out how many days since the movie was released (or how many days till release, for some)</li>
The syntax `uid(F_PJ, F_MS)` means the UIDs in either `F_PJ` or `F_MS` and is equivalent to `uid(F_PJ) OR uid(F_MS)`.
636
+
</code></pre>
637
+
638
+
<p>The syntax <code>uid(F_PJ, F_MS)</code> means the UIDs in either <code>F_PJ</code> or <code>F_MS</code> and is equivalent to <code>uid(F_PJ) OR uid(F_MS)</code>.</p>
0 commit comments