The v25 release of Dgraph introduces new features and brings the full code base under the Apache-2.0 license, reducing barriers for teams of all sizes to choose Dgraph for AI-ready knowledge graphs.
As we prepare for the general availability, we’re making a set of preview releases available for use on Hypermode and locally. The fastest way to get started is to sign up for a free Hypermode account.
The run locally, use the Docker image dgraph/standalone:v25.0.0-preview4
.
The following new features are currently available in the preview release:
Additionally, the following former enterprise features are available in the preview release with no license key required:
Upcoming preview releases include a simplified import command and native user authentication and authorization (formerly Access Control Lists).
Namespaces allow you to create logically separated environments for your data, enabling multi-customer apps without the overhead of managing a database per customer.
The default namespace is created when the cluster is provisioned. It is named
root
.
Namespace APIs are part of the v2 APIs. The v2 APIs are available in
the dgo/v250
package today. Other SDKs are being updated currently.
To create a namespace, use the CreateNamespace
function.
You can now pass this name to SetSchema
, RunDQL
or similar functions.
To drop a namespace, use the DropNamespace
function.
To rename a namespace, use the RenameNamespace
function.
To list all namespaces, use the ListNamespaces
function.
Version 25 introduces support for v2 APIs, including simpler client creation and
DQL execution. The v2 APIs are available in the dgo/v250
package today. Other
clients are being updated currently.
The dgo package supports connecting to a Dgraph cluster using connection
strings. Dgraph connection strings take the form dgraph://host:port?arguments
with support for the following arguments:
Argument | Value | Description |
---|---|---|
bearertoken | <token> | an access token |
sslmode | disable require verify-ca | TLS option, the default is disable . If verify-ca is set, the TLS certificate configured in the Dgraph cluster must be from a valid certificate authority. |
To create a client, use the Open
function with a connection string.
For more control, you can create a client using the NewClient
function.
You can connect to multiple alphas using NewRoundRobinClient
.
You can use either Open
or NewClient
to connect to a Hypermode Graph.
Hypermode automatically handles load balancing in multi-node clusters.
Using Open
with a connection string:
Using NewClient
:
To set the schema, use the SetSchema
function.
To run a mutation, use the RunDQL
function.
To run a query, use the same RunDQL
function.
To run a query with variables, using RunDQLWithVars
.
To run a BestEffort
query, use the same RunDQL
function with TxnOption
.
To run a ReadOnly
query, use the same RunDQL
function with TxnOption
.
To get the query response in RDF format instead of JSON format, use the
following TxnOption
.
The RunDQL
function also allows you to run upserts as well.
A conditional upsert can be run using the @if
directive.
In order to drop all data in the cluster and start fresh, use the
DropAllNamespaces
function.
The Model Context Protocol (MCP) is a standard for making tools, data, and prompts available to AI models. It can be especially useful in bringing context on your stack into coding assistants.
Version 25 of Dgraph introduces two MCP servers with common tools for AI coding assistants:
mcp
– a server that provides tools and data from your Dgraph clustermcp-ro
– a server that provides tools and data from your Dgraph cluster in
read-only modeTo add the MCP server to your coding assistant, add the following to your configuration file:
When using Hypermode Graphs, the MCP configuration is available on the graph details screen in the console.
The MCP servers provide the following tools:
Get-Schema
– fetch the schema of your clusterRun-Query
– run a query on your clusterRun-Mutation
– run a mutation on your clusterAlter-Schema
– modify the schema of your clusterGet-Common-Queries
– provides reference queries to aide in query syntaxFor clients that support prompts over the MCP protocol, a prompt is available to provide an introduction to the agent.
The full text of the prompt is available in the Dgraph repo.
The v25 release of Dgraph introduces new features and brings the full code base under the Apache-2.0 license, reducing barriers for teams of all sizes to choose Dgraph for AI-ready knowledge graphs.
As we prepare for the general availability, we’re making a set of preview releases available for use on Hypermode and locally. The fastest way to get started is to sign up for a free Hypermode account.
The run locally, use the Docker image dgraph/standalone:v25.0.0-preview4
.
The following new features are currently available in the preview release:
Additionally, the following former enterprise features are available in the preview release with no license key required:
Upcoming preview releases include a simplified import command and native user authentication and authorization (formerly Access Control Lists).
Namespaces allow you to create logically separated environments for your data, enabling multi-customer apps without the overhead of managing a database per customer.
The default namespace is created when the cluster is provisioned. It is named
root
.
Namespace APIs are part of the v2 APIs. The v2 APIs are available in
the dgo/v250
package today. Other SDKs are being updated currently.
To create a namespace, use the CreateNamespace
function.
You can now pass this name to SetSchema
, RunDQL
or similar functions.
To drop a namespace, use the DropNamespace
function.
To rename a namespace, use the RenameNamespace
function.
To list all namespaces, use the ListNamespaces
function.
Version 25 introduces support for v2 APIs, including simpler client creation and
DQL execution. The v2 APIs are available in the dgo/v250
package today. Other
clients are being updated currently.
The dgo package supports connecting to a Dgraph cluster using connection
strings. Dgraph connection strings take the form dgraph://host:port?arguments
with support for the following arguments:
Argument | Value | Description |
---|---|---|
bearertoken | <token> | an access token |
sslmode | disable require verify-ca | TLS option, the default is disable . If verify-ca is set, the TLS certificate configured in the Dgraph cluster must be from a valid certificate authority. |
To create a client, use the Open
function with a connection string.
For more control, you can create a client using the NewClient
function.
You can connect to multiple alphas using NewRoundRobinClient
.
You can use either Open
or NewClient
to connect to a Hypermode Graph.
Hypermode automatically handles load balancing in multi-node clusters.
Using Open
with a connection string:
Using NewClient
:
To set the schema, use the SetSchema
function.
To run a mutation, use the RunDQL
function.
To run a query, use the same RunDQL
function.
To run a query with variables, using RunDQLWithVars
.
To run a BestEffort
query, use the same RunDQL
function with TxnOption
.
To run a ReadOnly
query, use the same RunDQL
function with TxnOption
.
To get the query response in RDF format instead of JSON format, use the
following TxnOption
.
The RunDQL
function also allows you to run upserts as well.
A conditional upsert can be run using the @if
directive.
In order to drop all data in the cluster and start fresh, use the
DropAllNamespaces
function.
The Model Context Protocol (MCP) is a standard for making tools, data, and prompts available to AI models. It can be especially useful in bringing context on your stack into coding assistants.
Version 25 of Dgraph introduces two MCP servers with common tools for AI coding assistants:
mcp
– a server that provides tools and data from your Dgraph clustermcp-ro
– a server that provides tools and data from your Dgraph cluster in
read-only modeTo add the MCP server to your coding assistant, add the following to your configuration file:
When using Hypermode Graphs, the MCP configuration is available on the graph details screen in the console.
The MCP servers provide the following tools:
Get-Schema
– fetch the schema of your clusterRun-Query
– run a query on your clusterRun-Mutation
– run a mutation on your clusterAlter-Schema
– modify the schema of your clusterGet-Common-Queries
– provides reference queries to aide in query syntaxFor clients that support prompts over the MCP protocol, a prompt is available to provide an introduction to the agent.
The full text of the prompt is available in the Dgraph repo.