kensho-technologies / graphql-compiler

Turn complex GraphQL queries into optimized database queries.
Apache License 2.0
552 stars 50 forks source link

Support Huawei Cloud Service (Gremlin) #167

Open archenroot opened 5 years ago

archenroot commented 5 years ago

I am looking for support of Huawei Graph Engine Service (cloud), which supports "pure" Gremlin, I need to ask first if they or not customizing their own dialect. I think this shouldn't be that hard, i can start with driver change.

Q: What is difference in OrientDB Gremlin "dialect" vs pure Gremlin? Or what should I do to support pure Gremlin? Q: How do you construct typical GraphQL schema for Graph? I was even thinking to create one super big root GraphQL schema covering all labels, properties, etc.

Any help from real world experience welcomed.

Thank you.

obi1kenobi commented 5 years ago

Hi @archenroot, thanks for your question.

There are two smallish differences that I can think of, both of which should be addressable quite easily and both of which arose due to my unfortunate inexperience with GraphQL outside of OrientDB's implementation.

As a temporary hack, while you are prototyping, I suspect you should be able to eliminate both of these problems with some simple string manipulation, something like a find-and-replace operation.

As for creating the schema, we usually introspect the database to create a schema that contains descriptions of all types (tables), with all of their properties and all edges connecting different types. We're hoping to open-source an automatic GraphQL schema generation tool based on database introspection (for OrientDB) in the coming months, but we don't have a specific date we can commit to.

Please keep me and the other maintainers in the loop on this. We are currently in the design phase of some fairly major changes to the compiler internals, and if there's something we can do to make generating different dialects of Gremlin easier, I'd love to look into it.