Skip to content

Response Streaming in JS#3395

Open
Cole-Greer wants to merge 1 commit intomasterfrom
JS-streaming
Open

Response Streaming in JS#3395
Cole-Greer wants to merge 1 commit intomasterfrom
JS-streaming

Conversation

@Cole-Greer
Copy link
Copy Markdown
Contributor

@Cole-Greer Cole-Greer commented Apr 21, 2026

Add streaming HTTP response handling to gremlin-javascript, enabling incremental result consumption via fetch response.body ReadableStream.

  • Add StreamReader abstraction for async byte reading over streaming and buffered sources
  • Refactor all ~20 GraphBinary serializers from sync deserialize(buffer) to async deserialize(reader)
  • Refactor GraphBinaryReader.readResponse() to use StreamReader
  • Add Connection.stream() using fetch response.body ReadableStream
  • Add Client.stream() returning AsyncGenerator
  • Wire Traversal API (next(), hasNext(), toList()) to streaming for incremental consumption, matching Go GLV behavior
  • submit() remains non-streaming, buffers full response
  • Remove dead readable-stream dependency and Readable imports

VOTE +1

Add streaming HTTP response handling to gremlin-javascript, enabling
incremental result consumption via fetch response.body ReadableStream.

- Add StreamReader abstraction for async byte reading over streaming
  and buffered sources
- Refactor all ~20 GraphBinary serializers from sync deserialize(buffer)
  to async deserialize(reader)
- Refactor GraphBinaryReader.readResponse() to use StreamReader
- Add Connection.stream() using fetch response.body ReadableStream
- Add Client.stream() returning AsyncGenerator
- Wire Traversal API (next(), hasNext(), toList()) to streaming for
  incremental consumption, matching Go GLV behavior
- submit() remains non-streaming, buffers full response
- Remove dead readable-stream dependency and Readable imports
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