Skip to content

Commit bf9a3f8

Browse files
authored
correct dgraph imports in v25 preview docs (#133)
1 parent 494d2f9 commit bf9a3f8

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

dgraph/sdks/go.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The client can be obtained in the usual way via `go get`:
1717
```sh
1818
Requires at least Go 1.23
1919
export GO111MODULE=on
20-
go get -u -v github.com/dgraph-io/dgo/v210
20+
go get -u -v github.com/dgraph-io/dgo/v240
2121
```
2222

2323
The full [GoDoc](https://godoc.org/github.com/dgraph-io/dgo) contains

dgraph/v25-preview.mdx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ releases available for use on Hypermode and locally. The fastest way to get
1414
started is to sign up for a free
1515
[Hypermode account](https://hypermode.com/login).
1616

17-
The run locally, use the Docker image `dgraph/standalone:v25.0.0-preview3`.
17+
The run locally, use the Docker image `dgraph/standalone:v25.0.0-preview4`.
1818

1919
```bash
20-
docker run --rm -it -p 8080:8080 -p 9080:9080 dgraph/standalone:v25.0.0-preview3
20+
docker run --rm -it -p 8080:8080 -p 9080:9080 dgraph/standalone:v25.0.0-preview4
2121
```
2222

2323
## Features
@@ -291,14 +291,19 @@ To get the query response in RDF format instead of JSON format, use the
291291
following `TxnOption`.
292292

293293
```go
294+
import (
295+
"github.com/dgraph-io/dgo/v250"
296+
"github.com/dgraph-io/dgo/v250/protos/api_v2"
297+
)
298+
294299
queryDQL := `{
295300
alice(func: eq(name, "Alice")) {
296301
name
297302
email
298303
age
299304
}
300305
}`
301-
resp, err = client.RunDQL(context.TODO(), dgo.RootNamespace, queryDQL, dgo.WithResponseFormat(api_v25.RespFormat_RDF))
306+
resp, err = client.RunDQL(context.TODO(), dgo.RootNamespace, queryDQL, dgo.WithResponseFormat(api_v2.RespFormat_RDF))
302307
// handle error
303308
fmt.Printf("%s\n", resp.QueryResult)
304309
```

0 commit comments

Comments
 (0)