Merged
Conversation
- Update proto definitions to Dgraph v25 (8 new RPCs) - Add RunDQL API for running DQL queries/mutations directly - Add allocateUIDs, allocateTimestamps, allocateNamespaces methods - Add namespace management (createNamespace, dropNamespace, listNamespaces) - Add convenience methods (dropAll, dropData, dropPredicate, dropType, setSchema) - Remove defunct Dgraph Cloud code (clientStubFromSlash/CloudEndpoint) - Update copyright from Hypermode Inc. to Istari Digital, Inc. - Update GitHub org references from hypermodeinc to dgraph-io - Fix ExceptionUtil.isJwtExpired() to handle UNKNOWN status code - Add 24 new integration tests across 4 test classes - Update documentation, CHANGELOG, samples, and CI workflows - Bump version to 25.0.0
…links - Restore clientStubFromSlashEndpoint and clientStubFromCloudEndpoint as @deprecated stubs that throw UnsupportedOperationException - Update 5 broken docs.dgraph.io links to match new site structure: - /deploy/#tls-configuration → /admin/security/tls-configuration - /master/query-language/#indexes-in-background → /dql/dql-schema/#predicate-indexing - /mutations/#upsert-block → /dql/dql-mutation#upsert-block - /mutations/#conditional-upsert → /dql/dql-mutation#conditional-upsert - /clients/overview/#transactions → /clients/#transactions
…RuntimeException - DgraphException now extends StatusRuntimeException for backward compatibility - TxnException reparented under DgraphException for unified hierarchy - 7 new typed exception classes for specific error conditions - isRetryable() on all exceptions, serialVersionUID on all classes - DgraphInterruptedException uses Status.CANCELLED and preserves interrupt flag - 21 tests covering hierarchy, status codes, retryability, and message format
matthewmcneely
requested changes
Mar 2, 2026
…ExceptionUtil translate() now unwraps CompletionException before type-checking, preventing typed exceptions from being re-translated into generic ones. findStatusRuntimeException() guards against circular cause chains and limits traversal depth to 20.
…ionUtil to Exceptions - Rename all DgraphException subclasses: DgraphAlphaException -> AlphaException, DgraphConnectionException -> ConnectionException, DgraphAuthException -> AuthException, etc. - Rename DgraphInterruptedException to CancelledException, then remove it entirely (InterruptedException wraps to generic DgraphException, preserving interrupt flag) - Rename ExceptionUtil -> Exceptions; retain ExceptionUtil as deprecated delegate - Rename DgraphOperationNotAllowedException -> DisallowedOperationException - Simplify Exceptions.translate(): no cause-chain walking, direct instanceof checks only - Remove findStatusRuntimeException() (over-engineered for our code paths) - Rewrite README exception section: hierarchy diagram + progressive catch examples instead of kitchen-sink catch block - Add TxnException.getMessage() override for backward-compatible plain descriptions - DgraphException keeps its prefix as the hierarchy root
Add RetryPolicy, TransactionOp, AsyncTransactionOp, and withRetry() on both DgraphClient (blocking) and DgraphAsyncClient (non-blocking via delayedExecutor). Supports read-only and best-effort transactions via RetryPolicy.readOnly() and RetryPolicy.bestEffort().
…n AlterConvenienceTest
AclTest.verifyOperation now handles typed DgraphException subclasses
(e.g. AuthException) thrown directly rather than wrapped in a cause
chain, since Exceptions.translate() produces typed exceptions that ARE
StatusRuntimeExceptions.
AlterConvenienceTest.testDropType uses 'schema { types }' instead of
'schema(type: Person) {}' which returned empty on the CI cluster.
Closed
…tility class Moves runWithRetries (JWT-refresh retry) and attemptAsync (managed transaction retry with backoff) out of DgraphAsyncClient into a stateless utility class. DgraphAsyncClient delegates to the static methods, passing its own retryLogin callback, executor, and transaction factory as parameters.
matthewmcneely
requested changes
Mar 5, 2026
Contributor
matthewmcneely
left a comment
There was a problem hiding this comment.
Also, and this is a big one, Istari legal want the copyright header to read
/*
* SPDX-FileCopyrightText: © 2017-2026 Istari Digital, Inc.
* SPDX-License-Identifier: Apache-2.0
*/
- Update CODEOWNERS to use @dgraph-io/maintainers team - Fix docs repo link to dgraph-io/dgraph-docs in PR template - Update SPDX copyright headers to include year range (2017-2026) - Add SPDX headers to sample source files missing them
matthewmcneely
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades dgraph4j from v24.2.0 to v25.0.0, bringing full parity with the Dgraph v25 API.
New APIs
allocateUIDs(),allocateTimestamps(),allocateNamespaces()createNamespace(),dropNamespace(),listNamespaces()dropAll(),dropData(),dropPredicate(),dropType(),setSchema()All methods available on both
DgraphAsyncClient(returningCompletableFuture<T>) andDgraphClient(sync wrapper).Typed Exception Hierarchy
All exceptions now extend
DgraphException(which extendsStatusRuntimeException), withisRetryable()on every subclass. Existingcatch (StatusRuntimeException e)blocks continue to work.Exceptionsutility class centralizes translation from gRPC status codes to typed exceptions.ExceptionUtilretained as deprecated alias for backward compatibility.Automatic Retry
withRetry()on bothDgraphClientandDgraphAsyncClientprovides managed transaction retry with exponential backoff:Configurable via
RetryPolicywith support for read-only and best-effort transactions:Async variant uses non-blocking backoff via
CompletableFuture.delayedExecutor.Internal Refactoring
CompletableFuturesutility class — extractedrunWithRetries(JWT-refresh retry) andattemptAsync(managed transaction retry with backoff) fromDgraphAsyncClientinto a stateless static utility class, keeping the async client focused on the Dgraph API surface@rarvikarto@mlwellesOther Changes
hypermodeinctodgraph-ioclientStubFromSlashEndpoint/clientStubFromCloudEndpoint(now throwUnsupportedOperationExceptionwith migration guidance)isJwtExpired()to handleUNKNOWNstatus codedocs.dgraph.iolinks to match new site structureDeprecated
clientStubFromSlashEndpoint()— throwsUnsupportedOperationException, useclientStub()insteadclientStubFromCloudEndpoint()— throwsUnsupportedOperationException, useclientStub()insteadExceptionUtil— useExceptionsinsteadRemoved
Test plan
ExceptionHierarchyTest,ExceptionMappingTest,RetryPolicyTest./gradlew clean generateProto compileJavasucceedstestDropTypefixed — addeddropAll()for clean schema state before type creationCloses #283