Skip to content

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

Merged
kenhuuu merged 3 commits into
masterfrom
interceptor-redesign
Jun 12, 2026
Merged

TINKERPOP-3250 Standarize interceptor API and JSON request amongst GLVs#3447
kenhuuu merged 3 commits into
masterfrom
interceptor-redesign

Conversation

@kenhuuu

@kenhuuu kenhuuu commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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

@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
Comment thread docs/src/upgrade/release-4.x.x.asciidoc
Comment thread docs/src/reference/gremlin-variants.asciidoc Outdated
Comment thread gremlin-python/src/main/python/gremlin_python/driver/connection.py
@xiazcy

xiazcy commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

VOTE +1

1 similar comment
@Cole-Greer

Copy link
Copy Markdown
Contributor

VOTE +1

@kenhuuu kenhuuu force-pushed the interceptor-redesign branch 4 times, most recently from be1ead6 to f11624a Compare June 12, 2026 04:45
…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 force-pushed the interceptor-redesign branch from f11624a to 625e9d3 Compare June 12, 2026 19:34
@kenhuuu kenhuuu merged commit 24df1d2 into master Jun 12, 2026
46 of 48 checks passed
@kenhuuu kenhuuu deleted the interceptor-redesign branch June 12, 2026 23:21
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.

4 participants