Skip to content

Commit fa2b1e4

Browse files
Updating table of contents (#78)
1 parent 98119b5 commit fa2b1e4

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

README.md

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ and understand how to run and work with Dgraph.
2121

2222
- [Install](#install)
2323
- [Quickstart](#quickstart)
24-
- [Using a client](#using-a-client)
25-
- [Creating a client](#creating-a-client)
26-
- [Altering the database](#altering-the-database)
27-
- [Creating a transaction](#creating-a-transaction)
28-
- [Running a mutation](#running-a-mutation)
29-
- [Running a query](#running-a-query)
30-
- [Running an upsert: query + mutation](#running-an-upsert-query--mutation)
31-
- [Running a conditional upsert](#running-a-conditional-upsert)
32-
- [Committing a transaction](#committing-a-transaction)
24+
- [Using a Client](#using-a-client)
25+
- [Creating a Client](#creating-a-client)
26+
- [Altering the Database](#altering-the-database)
27+
- [Creating a Transaction](#creating-a-transaction)
28+
- [Running a Mutation](#running-a-mutation)
29+
- [Running a Query](#running-a-query)
30+
- [Running an Upsert: Query + Mutation](#running-an-upsert-query--mutation)
31+
- [Running a Conditional Upsert](#running-a-conditional-upsert)
32+
- [Committing a Transaction](#committing-a-transaction)
3333
- [Cleanup Resources](#cleanup-resources)
3434
- [Debug mode](#debug-mode)
3535
- [Examples](#examples)
@@ -73,9 +73,9 @@ Note: Only API breakage from *v1.X.Y* to *v2.X.Y* is in
7373
the function `DgraphClient.newTxn().mutate()`. This function returns a `messages.Assigned`
7474
type in *v1.X* but a `messages.Response` type in *v2.X*.
7575

76-
## Using a client
76+
## Using a Client
7777

78-
### Creating a client
78+
### Creating a Client
7979

8080
A `DgraphClient` object can be initialised by passing it a list of
8181
`DgraphClientStub` clients as variadic arguments. Connecting to multiple Dgraph
@@ -98,7 +98,7 @@ const dgraphClient = new dgraph.DgraphClient(clientStub);
9898

9999
To facilitate debugging, [debug mode](#debug-mode) can be enabled for a client.
100100

101-
### Altering the database
101+
### Altering the Database
102102

103103
To set the schema, create an `Operation` object, set the schema and pass it to
104104
`DgraphClient#alter(Operation)` method.
@@ -132,7 +132,7 @@ op.setDropAll(true);
132132
await dgraphClient.alter(op);
133133
```
134134
135-
### Creating a transaction
135+
### Creating a Transaction
136136

137137
To create a transaction, call `DgraphClient#newTxn()` method, which returns a
138138
new `Txn` object. This operation incurs no network overhead.
@@ -152,7 +152,7 @@ try {
152152
}
153153
```
154154

155-
### Running a mutation
155+
### Running a Mutation
156156

157157
`Txn#mutate(Mutation)` runs a mutation. It takes in a `Mutation` object, which
158158
provides two main ways to set data: JSON and RDF N-Quad. You can choose whichever
@@ -197,7 +197,7 @@ req.setMutationsList([mu]);
197197
await txn.doRequest(req);
198198
```
199199

200-
### Running a query
200+
### Running a Query
201201

202202
You can run a query by calling `Txn#query(string)`. You will need to pass in a
203203
GraphQL+- query string. If you want to pass an additional map of any variables that
@@ -256,7 +256,7 @@ const res = await txn.doRequest(req);
256256
console.log(JSON.stringify(res.getJson()));
257257
```
258258

259-
### Running an upsert: query + mutation
259+
### Running an Upsert: query + mutation
260260

261261
The `txn.doRequest` function allows you to run upserts consisting of one query and one mutation.
262262
Query variables could be defined and can then be used in the mutation. You can also use the
@@ -283,7 +283,7 @@ req.setCommitNow(true);
283283
await dgraphClient.newTxn().doRequest(req);
284284
```
285285

286-
### Running a conditional upsert
286+
### Running a Conditional Upsert
287287

288288
The upsert block allows specifying a conditional mutation block using an `@if` directive. The mutation is executed
289289
only when the specified condition is true. If the condition is false, the mutation is silently ignored.
@@ -308,7 +308,7 @@ req.setCommitNow(true);
308308
await dgraphClient.newTxn().doRequest(req);
309309
```
310310

311-
### Committing a transaction
311+
### Committing a Transaction
312312

313313
A transaction can be committed using the `Txn#commit()` method. If your transaction
314314
consisted solely of calls to `Txn#query` or `Txn#queryWithVars`, and no calls to

0 commit comments

Comments
 (0)