Skip to content

Commit e529ae7

Browse files
authored
Documentation for best-effort queries. (#54)
1 parent b24d82e commit e529ae7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,12 @@ finally:
123123

124124
`client.query()` uses a read-only transaction to execute the query.
125125

126+
To create a read-only transaction that executes best-effort queries, call
127+
`DgraphClient#txn(read_only=True, best_effort=True)`. Best-effort queries are
128+
faster than normal queries because they bypass the normal consensus protocol.
129+
For this same reason, best-effort queries cannot guarantee to return the latest
130+
data. Best-effort queries are only supported by read-only transactions.
131+
126132
### Run a mutation
127133

128134
`Txn#mutate(mu=Mutation)` runs a mutation. It takes in a `Mutation` object,

0 commit comments

Comments
 (0)