Comments (11)
After a little bit more digging, it appears it may be an incompatibility with the Cosmos DB driver not supporting bytecode-type IO.
ExceptionType : GraphMalformedException
ExceptionMessage :
Gremlin Malformed Request: Unsupported request operation: 'bytecode'.
GremlinRequestId : c18a6d7e-6704-4e02-b66f-1f39ab9caa82
Context : global
GraphInterOpStatusCode : MalformedRequest
HResult : 0x80131500
(498)
Looks like we might be stuck with the client.submit()
method until the support is added.
from azure-cosmos-db-graph-nodejs-getting-started.
Not sure the status of this repository, but the "current" MSFT docs point here. @LuisBosquez When using the [email protected]
npm package, it appears that the remote either doesn't support or isn't expecting GraphSON v3:
- ResponseError: Server error:
ActivityId : 0991f445-8fc6-486f-b2e4-f1b636f8225c
ExceptionType : GraphMalformedException
ExceptionMessage :
Gremlin Malformed Request: GraphSON v3 IO is not supported.
GremlinRequestId : 0991f445-8fc6-486f-b2e4-f1b636f8225c
Context : global
GraphInterOpStatusCode : MalformedRequest
HResult : 0x80131500
(498)
Moreover, to @andry85mae's point, the documentation from the TinkerPop project itself recommends against using the client.submit()
method and is maintaining this for legacy compatibility only βΒ the fluent API is preferred.
TinkerPop does not recommend submitting script-based requests and generally continues to support this feature for legacy reasons and corner use cases which are still not completely addressed by the Gremlin language. Please consider using bytecode-based requests instead when possible
Can we get specifics on a few things?:
- Should the Cosmos DB driver support this version of the Gremlin client?
- If not, what version is supported?
- If so, what needs to be done to make it work?
- For both of the above, please document this in the README
- Are there plans to update this to example to the fluent API as it's significantly easier to work with than string manipulation and "parameterised" queries?
from azure-cosmos-db-graph-nodejs-getting-started.
hello @andry85mae, can you please provide an example of the error you're getting?
from azure-cosmos-db-graph-nodejs-getting-started.
Does Cosmos support this latest version https://www.npmjs.com/package/gremlin 3.4.4 in 2020? If not, what do I need to use? The example links to npm gremlin, which does not use the same code as this example.
from azure-cosmos-db-graph-nodejs-getting-started.
There is feedback here, and it looks like this was supposed to be done earlier this year. Still not here unfortunately https://feedback.azure.com/forums/263030-azure-cosmos-db/suggestions/33632779-support-gremlin-bytecode-to-enable-the-fluent-api
from azure-cosmos-db-graph-nodejs-getting-started.
Hope this is fixed soon
from azure-cosmos-db-graph-nodejs-getting-started.
I gave up. I wasn't seeing any progress on this api. I ended up building my own with GraphQL and two collections: nodes and links. Then I simply write graphQL queries. Cosmos SQL API, not Gremlin.
from azure-cosmos-db-graph-nodejs-getting-started.
Was this fix? Or going to be fix? (I'm getting the same error too V.3.5.1)
from azure-cosmos-db-graph-nodejs-getting-started.
still not fixed.
const client = new gremlin.driver.Client(
config.endpoint, {
authenticator,
traversalsource: "g",
rejectUnauthorized: true,
mimeType: "application/vnd.gremlin-v2.0+json"
}
);
const traversal = gremlin.process.AnonymousTraversalSource.traversal;
const DriverRemoteConnection = gremlin.driver.DriverRemoteConnection;
const g = traversal().withRemote(client);
// client.submit("g.V()", function (err, results) {
// }).then(function (result) {
// console.log("Result: %s\n", JSON.stringify(result));
// });
async function main() {
const names = await g.V().hasLabel('person').values('name').toList();
console.log(names);
}
main();
from azure-cosmos-db-graph-nodejs-getting-started.
Not reproducible with latest sample + gremlin-javascript version 3.4.13
from azure-cosmos-db-graph-nodejs-getting-started.
I just reproduced it with 3.6.1.
And it is still open: https://feedback.azure.com/d365community/idea/aa287df8-0e25-ec11-b6e6-000d3a4f0858
from azure-cosmos-db-graph-nodejs-getting-started.
Related Issues (14)
- Store Persian Text in Values HOT 1
- SASL auth error trying to connect HOT 5
- 401 Response HOT 7
- ERROR: Partition key property must be provided HOT 5
- Unexpected Server Response HOT 2
- Cannot create an edge using gremlin version 3.4
- GraphMalformedException with array parameters. HOT 1
- Connecting to https HOT 1
- Cannot connect to gremlin db HOT 1
- Open / Close connection & performance HOT 1
- New version of gremlin-javascript? HOT 1
- Can't terminate the connection HOT 2
- Wildcard Vertex Property Searching HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure-cosmos-db-graph-nodejs-getting-started.