Registry / database / dgraph-io-dgo-v210

dgraph-io-dgo-v210

JSON →
librarygogounverified

Package dgo is used to interact with a Dgraph server.

go get github.com/dgraph-io/dgo/v210
INSTALL
IMPORT
SIG · DGRAPH-IO-DGO-V210
D
dgraph-io-dgo-v210
databasego
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

dgo
github.com/dgraph-io/dgo/v210

Connects to a local Dgraph instance and runs a simple query.

package main import ( "context" "fmt" "log" "github.com/dgraph-io/dgo/v210" "github.com/dgraph-io/dgo/v210/protos/api" "google.golang.org/grpc" ) func main() { conn, err := grpc.Dial("localhost:9080", grpc.WithInsecure()) if err != nil { log.Fatal(err) } defer conn.Close() dc := dgo.NewDgraphClient(api.NewDgraphClient(conn)) resp, err := dc.NewTxn().Query(context.Background(), "{ me(func: has(name)) { name } }") if err != nil { log.Fatal(err) } fmt.Printf("Response: %s\n", resp.Json) }
Debug
Known issues

No known issues recorded.

Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
8
Resources
dgraph-io-dgo-v210 — go get dgraph-io-dgo-v210 · libregistry