Skip to content

Honor per-request options embedded in a script via with options#3518

Open
kenhuuu wants to merge 1 commit into
masterfrom
per-request
Open

Honor per-request options embedded in a script via with options#3518
kenhuuu wants to merge 1 commit into
masterfrom
per-request

Conversation

@kenhuuu

@kenhuuu kenhuuu commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

The server now applies per-request options set inside a submitted Gremlin string's with(): evaluationTimeout/timeoutMillis, materializeProperties, batchSize, bulkResults, and language, with a single precedence: script embedded with() > request field > (header, bulkResults only) > default. This fixes a regression where a script embedded timeoutMillis was silently ignored on the raw string path.

Options are resolved once in Context; batchSize is parsed and validated there, returning 400 Bad Request for a non positive or out of range value rather than stalling result iteration or surfacing an uncaught 500. Validation runs before any transaction begin side effects. g, parameters, and transactionId remain request field/header only, and the obsolete requestId scrape is removed from GremlinScriptChecker.

VOTE +1

The server now applies per-request options set inside a submitted Gremlin
string's with(): evaluationTimeout/timeoutMillis, materializeProperties,
batchSize, bulkResults, and language, with a single precedence:
script embedded with() > request field > (header, bulkResults only) > default.
This fixes a regression where a script embedded timeoutMillis was silently
ignored on the raw string path.

Options are resolved once in Context; batchSize is parsed and validated there,
returning 400 Bad Request for a non positive or out of range value rather than
stalling result iteration or surfacing an uncaught 500. Validation runs before
any transaction begin side effects. g, parameters, and transactionId remain
request field/header only, and the obsolete requestId scrape is removed from
GremlinScriptChecker.

Assisted-by: Claude Code:claude-opus-4-8
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.

1 participant