Skip to content

Commit 208e1ec

Browse files
authored
Merge pull request #161 from dgraph-io/aa-doc-pydgraph-D-2777
Docs (discuss feedback): fix incorrect statement about upsert blocks allowing one query and one mutation
2 parents de5e472 + 9978bf2 commit 208e1ec

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ pip install pydgraph
4545

4646
### Install Notes
4747

48-
To avoid issues when adding composite credentials or when using client authorization, please install gRPC version 1.19.0:
48+
To avoid issues when adding composite credentials or when using client authorization, please install gRPC version 1.19.0:
4949

5050
```sh
5151
pip install grpcio==1.19.0
@@ -300,10 +300,14 @@ txn.do_request(request)
300300

301301
### Running an Upsert: Query + Mutation
302302

303-
The `txn.do_request` function allows you to run upserts consisting of one query and
304-
one mutation. Query variables could be defined and can then be used in the mutation.
303+
The `txn.do_request` function allows you to use upsert blocks. An upsert block
304+
contains one query block and one or more mutation blocks, so it lets you perform
305+
queries and mutations in a single request. Variables defined in the query block
306+
can be used in the mutation blocks using the `uid` and `val` functions
307+
implemented by DQL.
305308

306-
To know more about upsert, we highly recommend going through the [mutations docs](https://docs.dgraph.io/mutations/#upsert-block).
309+
To learn more about upsert blocks, see the
310+
[Upsert Block documentation](https://dgraph.io/docs/mutations/upsert-block/).
307311

308312
```python
309313
query = """{

0 commit comments

Comments
 (0)