terminusdb-client-js
terminusdb-client-js copied to clipboard
queryDocument returns empty string when no results are found
The function queryDocument returns an empty string when a document can't be found. This is very confusing! As you can't check for the result being null or undefined. It should either throw some kind of exception OR return NULL.
when a document can't be found the server return an empty string or an empty array if you add "as_list":true in the request parameters
I think it is correct
the queryDocument (we use getDocument now queryDocument is deprecated) returns only the server answer
we need a way to streaming the result when as_list is false