File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ and understand how to run and work with Dgraph.
2424 * [ Run a mutation] ( #run-a-mutation )
2525 * [ Run a query] ( #run-a-query )
2626 * [ Commit a transaction] ( #commit-a-transaction )
27+ * [ Debug mode] ( #debug-mode )
2728- [ Development] ( #development )
2829 * [ Building the source] ( #building-the-source )
2930 * [ Running tests] ( #running-tests )
@@ -67,6 +68,8 @@ const clientStub = new dgraph.DgraphClientStub(
6768const dgraphClient = new dgraph.DgraphClient (clientStub);
6869```
6970
71+ To facilitate debugging, [ debug mode] ( #debug-mode ) can be enabled for a client.
72+
7073### Alter the database
7174To set the schema, create an ` Operation ` object, set the schema and pass it to
7275` DgraphClient#alter(Operation) ` method.
@@ -230,6 +233,23 @@ try {
230233}
231234```
232235
236+ ### Debug mode
237+ Debug mode can be used to print helpful debug messages while performing alters,
238+ queries and mutations. It can be set using the` DgraphClient#setDebugMode(boolean?) `
239+ method.
240+
241+ ``` js
242+ // Create a client.
243+ const dgraphClient = new dgraph.DgraphClient (... );
244+
245+ // Enable debug mode.
246+ dgraphClient .setDebugMode (true );
247+ // OR simply dgraphClient.setDebugMode();
248+
249+ // Disable debug mode.
250+ dgraphClient .setDebugMode (false );
251+ ```
252+
233253## Development
234254
235255### Building the source
You can’t perform that action at this time.
0 commit comments