GithubHelp home page GithubHelp logo

Comments (11)

lukiffer avatar lukiffer commented on June 9, 2024 9

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.

lukiffer avatar lukiffer commented on June 9, 2024 1

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.

LuisBosquez avatar LuisBosquez commented on June 9, 2024

hello @andry85mae, can you please provide an example of the error you're getting?

from azure-cosmos-db-graph-nodejs-getting-started.

donniekerr avatar donniekerr commented on June 9, 2024

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.

ncausey avatar ncausey commented on June 9, 2024

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.

Adityagrao avatar Adityagrao commented on June 9, 2024

Hope this is fixed soon

from azure-cosmos-db-graph-nodejs-getting-started.

donniekerr avatar donniekerr commented on June 9, 2024

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.

odeliat avatar odeliat commented on June 9, 2024

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.

questsin avatar questsin commented on June 9, 2024

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.

olivertowers avatar olivertowers commented on June 9, 2024

Not reproducible with latest sample + gremlin-javascript version 3.4.13

from azure-cosmos-db-graph-nodejs-getting-started.

igord avatar igord commented on June 9, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.