@@ -143,7 +143,7 @@ sch := `
143143 email: string @index(exact) @unique .
144144 age: int .
145145`
146- err := client.SetSchema (context.TODO (), dgo. RootNamespace , sch)
146+ err := client.SetSchema (context.TODO (), sch)
147147// Handle error
148148```
149149
@@ -159,7 +159,7 @@ mutationDQL := `{
159159 _:alice <age> "29" .
160160 }
161161}`
162- resp , err := client.RunDQL (context.TODO (), dgo. RootNamespace , mutationDQL)
162+ resp , err := client.RunDQL (context.TODO (), mutationDQL)
163163// Handle error
164164// Print map of blank UIDs
165165fmt.Printf (" %+v \n " , resp.Uids )
@@ -177,7 +177,7 @@ queryDQL := `{
177177 age
178178 }
179179}`
180- resp , err := client.RunDQL (context.TODO (), dgo. RootNamespace , queryDQL)
180+ resp , err := client.RunDQL (context.TODO (), queryDQL)
181181// Handle error
182182fmt.Printf (" %s \n " , resp.Json )
183183```
@@ -195,7 +195,7 @@ queryDQL = `query Alice($name: string) {
195195 }
196196}`
197197vars := map [string ]string {" $name" : " Alice" }
198- resp , err := client.RunDQLWithVars (context.TODO (), dgo. RootNamespace , queryDQL, vars)
198+ resp , err := client.RunDQLWithVars (context.TODO (), queryDQL, vars)
199199// Handle error
200200fmt.Printf (" %s \n " , resp.Json )
201201```
@@ -212,7 +212,7 @@ queryDQL := `{
212212 age
213213 }
214214}`
215- resp , err := client.RunDQL (context.TODO (), dgo. RootNamespace , queryDQL, dgo.WithBestEffort ())
215+ resp , err := client.RunDQL (context.TODO (), queryDQL, dgo.WithBestEffort ())
216216// Handle error
217217fmt.Printf (" %s \n " , resp.Json )
218218```
@@ -229,7 +229,7 @@ queryDQL := `{
229229 age
230230 }
231231}`
232- resp , err := client.RunDQL (context.TODO (), dgo. RootNamespace , queryDQL, dgo.WithReadOnly ())
232+ resp , err := client.RunDQL (context.TODO (), queryDQL, dgo.WithReadOnly ())
233233// Handle error
234234fmt.Printf (" %s \n " , resp.Json )
235235```
@@ -246,7 +246,7 @@ queryDQL := `{
246246 age
247247 }
248248}`
249- resp, err = client.RunDQL (context.TODO (), dgo. RootNamespace , queryDQL, dgo.WithResponseFormat (api_v2.RespFormat_RDF ))
249+ resp, err = client.RunDQL (context.TODO (), queryDQL, dgo.WithResponseFormat (api_v2.RespFormat_RDF ))
250250// Handle error
251251fmt.Printf (" %s \n " , resp.Rdf )
252252```
@@ -267,7 +267,7 @@ upsertQuery := `upsert {
267267 }
268268 }
269269}`
270- resp , err := client.RunDQL (context.TODO (), dgo. RootNamespace , upsertQuery)
270+ resp , err := client.RunDQL (context.TODO (), upsertQuery)
271271// Handle error
272272fmt.Printf (" %s \n " , resp.Json )
273273fmt.Printf (" %+v \n " , resp.Uids )
@@ -287,7 +287,7 @@ upsertQuery := `upsert {
287287 }
288288 }
289289}`
290- resp , err := client.RunDQL (context.TODO (), dgo. RootNamespace , upsertQuery)
290+ resp , err := client.RunDQL (context.TODO (), upsertQuery)
291291// Handle error
292292fmt.Printf (" %s \n " , resp.Json )
293293```
@@ -306,7 +306,7 @@ _, err := client.CreateNamespace(context.TODO())
306306To drop a namespace:
307307
308308``` go
309- _ , err := client.DropNamespace (context.TODO ())
309+ err := client.DropNamespace (context.TODO ())
310310// Handle error
311311```
312312
@@ -514,7 +514,7 @@ fmt.Printf("%s\n", resp.Json)
514514
515515### Query with RDF response
516516
517- You can get query result as a RDF response by calling ` txn.QueryRDF ` . The response would contain a
517+ You can get query result as an RDF response by calling ` txn.QueryRDF ` . The response would contain a
518518` Rdf ` field, which has the RDF encoded result.
519519
520520** Note:** If you are querying only for ` uid ` values, use a JSON format response.
0 commit comments