Cole-Greer commented on code in PR #3395:
URL: https://github.com/apache/tinkerpop/pull/3395#discussion_r3170262226
##########
gremlin-js/gremlin-javascript/lib/structure/io/binary/internals/GraphBinaryReader.js:
##########
@@ -35,7 +46,13 @@ export default class GraphBinaryReader {
return 'application/vnd.graphbinary-v4.0';
}
- readResponse(buffer) {
+ /**
+ * Read a complete response from a Buffer. Used by the non-streaming
submit() path.
+ * Returns the full { status, result } object after reading all data.
+ * @param {Buffer} buffer
+ * @returns {Promise<{status: {code, message, exception}, result: {data:
any[], bulked: boolean}}>}
+ */
+ async readResponse(buffer) {
Review Comment:
The deserializers all need to call something like `await
reader.readInt32BE()` to block on reads if they are waiting for the next chunk.
The deserialization itself needs to be async in order to call `await`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]