Skip to content

Commit fc0bab9

Browse files
authored
Revert "Staging/responsive (#208)" (#209)
This reverts commit c457660.
1 parent c457660 commit fc0bab9

File tree

760 files changed

+200379
-347129
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

760 files changed

+200379
-347129
lines changed

config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
baseURL = "https://dgraph.io/tour"
1+
baseURL = "https://tour.dgraph.io"
22
languageCode = "en-us"
33
title = "A Tour of Dgraph"
44
theme="hugo-tutorials"

content/aggregation/1.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
+++
2+
date = "2017-04-27T15:42:54+10:00"
3+
next = "/aggregation/2"
4+
prev = "/schema/6"
5+
title = "A bigger dataset"
6+
weight = 1
7+
+++
8+
9+
Ok, we are off to a start with Dgraph and GraphQL+-. Let’s move it up
10+
a few notches.
11+
12+
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.
13+
14+
In our github repository you'll find a [dataset about movies, directors
15+
and actors](https://github.com/dgraph-io/benchmarks/blob/master/data/goldendata.rdf.gz).
16+
17+
Download it from that link or with something like
18+
19+
```
20+
wget "https://github.com/dgraph-io/benchmarks/blob/master/data/goldendata.rdf.gz?raw=true" -O goldendata.rdf.gz -q
21+
```
22+
23+
Run the schema mutation and then load the dataset into Dgraph with
24+
25+
```
26+
dgraph-live-loader -f goldendata.rdf.gz
27+
```
28+
29+
Dgraph reports back exactly how many triples were loaded and how long
30+
it took. There are around ??? movies and ???
31+
actors are described in the dataset.
32+
33+
It's a big database of moves, but it won’t trouble Dgraph. It is, however, big enough to
34+
use for more complex queries.
35+
36+
Later in the tutorial, you might need to refer back to this page (or
37+
issue a [schema query](/basic/3)) to check the indexes or schema types. Remember that
38+
we can't apply functions to edges that aren't indexed, and some
39+
functions require particular indexes.

content/aggregation/1.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
mutation {
2+
schema {
3+
director.film: [uid] @reverse .
4+
genre: [uid] @reverse .
5+
initial_release_date: date @index .
6+
rating: [uid] @reverse .
7+
country: [uid] @reverse .
8+
loc: geo @index .
9+
name: string @index(term, fulltext) .
10+
}
11+
}

content/aggregation/2.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
+++
2+
date = "2017-04-27T15:42:57+10:00"
3+
next = "/aggregation/3"
4+
prev = "/aggregation/1"
5+
title = "Min and Max"
6+
weight = 2
7+
+++
8+
9+
The `min` and `max` aggreation functions can be used on all scalar
10+
types. That is: `int`, `float`, `string`, `bool`, `id` and `date`.
11+
12+
Agregations don't require an index, but can only be applied to variables

content/aggregation/2.txt

Whitespace-only changes.

content/sample/1.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
+++
2+
date = "2017-04-26T14:47:31+10:00"
3+
title = "Reverse Edges"
4+
next = "/sample/2"
5+
+++
6+
7+
Each graph edge is unidirectional. It points from one node to another.
8+
9+
A lot of times, you wish to access data in both directions, forward and backward.
10+
11+
Instead of having to send edges in both directions, you can use the @reverse keyword at the end of a uid (entity) field declaration in the schema.
12+
13+
This specifies that the reverse edge should be automatically generated. For example, if we want to add a reverse edge for directed_by predicate, we should have a schema as follows.
14+
15+
```js
16+
func Foo(bar Bar) error {
17+
return bar.Do();
18+
}
19+
```
20+
21+
{{% expandable %}}
22+
```
23+
{
24+
me(id:abc) {
25+
_name_
26+
}
27+
}
28+
```
29+
{{% /expandable %}}
30+
31+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
32+
33+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
34+
35+
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

content/sample/1.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
me(id: m.06pj8) {
3+
name@en
4+
~directed_by(first: 5) {
5+
name@en
6+
}
7+
}
8+
}

content/sample/2.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
+++
2+
date = "2017-04-26T16:16:25+10:00"
3+
title = "Some Title"
4+
next = "/sample/3"
5+
prev = "/sample/1"
6+
+++
7+
8+
Some Content

content/sample/2.txt

Whitespace-only changes.

content/sample/3.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
+++
2+
date = "2017-04-26T16:24:06+10:00"
3+
prev = "/sample/2"
4+
title = "Lesson Title"
5+
6+
+++
7+
8+
Hello world

0 commit comments

Comments
 (0)