TINKERPOP-3250 Standarize interceptor API and JSON request amongst GLVs#3447
Open
kenhuuu wants to merge 1 commit into
Open
TINKERPOP-3250 Standarize interceptor API and JSON request amongst GLVs#3447kenhuuu wants to merge 1 commit into
kenhuuu wants to merge 1 commit into
Conversation
…tion Redesign the request interceptor API across all GLVs to use a consistent mutate-only contract. Interceptors receive a mutable HTTP request object and modify it in place. The driver auto-serializes the request body to JSON (application/json) after all interceptors run via an idempotent serializeBody() method on the request object. Responses remain GraphBinary. The GraphBinary request serializers are retained in each GLV but are no longer wired into the default request path. Users who need GraphBinary request bodies can write a custom interceptor that calls the serializer. JavaScript: Add serializeBody() to HttpRequest class. Add toJSON() to RequestMessage for clean serialization without field-list duplication. The bulkResults field is changed from a string to a boolean in gremlin-go and gremlin-dotnet to match the provider specification which defines it as a JSON boolean. Assisted-by: Kiro:claude-opus-4-6
spmallette
reviewed
Jun 3, 2026
|
|
||
| === Upgrading for Users | ||
|
|
||
| ==== Request Interceptors |
Contributor
There was a problem hiding this comment.
As Upgrade Documentation I think this section should be grounded in what we had before a little bit. "When TinkerPop supported websockets prior to 4.0.0, it offered a RequestInterceptor interface that allowed . With the move to HTTP the notion of the 'interceptor' has shifted...."
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.
https://issues.apache.org/jira/browse/TINKERPOP-3250
Redesign the request interceptor API across all GLVs to use a consistent mutate-only contract. Interceptors receive a mutable HTTP request object and modify it in place. The driver auto-serializes the request body to JSON (application/json) after all interceptors run via an idempotent serializeBody() method on the request object. Responses remain GraphBinary.
The GraphBinary request serializers are retained in each GLV but are no longer wired into the default request path. Users who need GraphBinary request bodies can write a custom interceptor that calls the serializer.
JavaScript: Add serializeBody() to HttpRequest class. Add toJSON() to RequestMessage for clean serialization without field-list duplication.
The bulkResults field is changed from a string to a boolean in gremlin-go and gremlin-dotnet to match the provider specification which defines it as a JSON boolean.
Assisted-by: Kiro:claude-opus-4-6
VOTE +1