Skip to content

correct dgraph imports in v25 preview docs #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dgraph/sdks/go.mdx
Original file line number Diff line number Diff line change
@@ -17,7 +17,7 @@ The client can be obtained in the usual way via `go get`:
```sh
Requires at least Go 1.23
export GO111MODULE=on
go get -u -v github.com/dgraph-io/dgo/v210
go get -u -v github.com/dgraph-io/dgo/v240
```

The full [GoDoc](https://godoc.org/github.com/dgraph-io/dgo) contains
11 changes: 8 additions & 3 deletions dgraph/v25-preview.mdx
Original file line number Diff line number Diff line change
@@ -14,10 +14,10 @@ releases available for use on Hypermode and locally. The fastest way to get
started is to sign up for a free
[Hypermode account](https://hypermode.com/login).

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

```bash
docker run --rm -it -p 8080:8080 -p 9080:9080 dgraph/standalone:v25.0.0-preview3
docker run --rm -it -p 8080:8080 -p 9080:9080 dgraph/standalone:v25.0.0-preview4
```

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

```go
import (
"github.com/dgraph-io/dgo/v250"
"github.com/dgraph-io/dgo/v250/protos/api_v2"
)

queryDQL := `{
alice(func: eq(name, "Alice")) {
name
email
age
}
}`
resp, err = client.RunDQL(context.TODO(), dgo.RootNamespace, queryDQL, dgo.WithResponseFormat(api_v25.RespFormat_RDF))
resp, err = client.RunDQL(context.TODO(), dgo.RootNamespace, queryDQL, dgo.WithResponseFormat(api_v2.RespFormat_RDF))
// handle error
fmt.Printf("%s\n", resp.QueryResult)
```