Skip to content

TINKERPOP-3250 Standarize interceptor API and JSON request amongst GLVs#3447

Open
kenhuuu wants to merge 1 commit into
masterfrom
interceptor-redesign
Open

TINKERPOP-3250 Standarize interceptor API and JSON request amongst GLVs#3447
kenhuuu wants to merge 1 commit into
masterfrom
interceptor-redesign

Conversation

@kenhuuu
Copy link
Copy Markdown
Contributor

@kenhuuu kenhuuu commented Jun 2, 2026

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

…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
@kenhuuu kenhuuu changed the title Standarize interceptor API and JSON request amongst GLVs TINKERPOP-3250 Standarize interceptor API and JSON request amongst GLVs Jun 2, 2026

=== Upgrading for Users

==== Request Interceptors
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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...."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants