Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(GraphQL-compiler): Add GraphQL compiler project file. #18

Closed
wants to merge 1 commit into from

Conversation

obi1kenobi
Copy link

I'm adding an entry for the GraphQL compiler project. This is an open-source library that turns GraphQL into a general-purpose graph database query language by adding some custom directives. It is then able to compile any GraphQL query into a single optimized database query, in one of two target languages: Gremlin and OrientDB SQL. It has been rock-solid in our production environment here at Kensho for over 18 months now, and we have many features for it in active development.

We wrote a blog post about it with more details: https://blog.kensho.com/compiled-graphql-as-a-database-query-language-72e106844282

@dbohdan
Copy link
Owner

dbohdan commented Dec 27, 2017

Thanks for a detailed recommendation, but this isn't a good fit for the list. I am looking for database API servers that require a minimum of configuration and no code or nearly no code to get started with. One can definitely build such a server around this library, but the library itself isn't enough. See CONTRIBUTING for more.

@dbohdan dbohdan closed this Dec 27, 2017
@obi1kenobi
Copy link
Author

Thanks for the prompt review. Let me make sure I understand your comment -- if I were to create a wrapper around the library that ties together e.g. a Flask server and the pyorient database client with the GraphQL compiler in between, that'd be a better fit for this project?

If so, I'm happy to put something like this together so it can be included here -- it wouldn't even be 100 lines of code, so it shouldn't take that long.

@dbohdan
Copy link
Owner

dbohdan commented Dec 28, 2017

if I were to create a wrapper around the library that ties together e.g. a Flask server and the pyorient database client with the GraphQL compiler in between, that'd be a better fit for this project?

Short answer: yes.
Long answer: Not if it is going to be a one-off weekend hack. If you are committed to maintaining the wrapper along with the library and intend provide a reasonable user experience (configuration options, documentation, etc.), then sure. Actually, it would be neat to see this list cause a new entry to be made for it. :-)

@obi1kenobi
Copy link
Author

obi1kenobi commented Dec 28, 2017

I was planning on putting a Flask server in front of the compiler, and using the standard OrientDB database client to talk to a database. I expect a lot of Python programmers are quite familiar with Flask already, and this would let people rely on the existing documentation and configuration options, as well as carry over any experience they may already have with these tools.

I could also use that project as a neat demo and starter project so people can start using the GraphQL compiler much faster and with less effort. Sounds like a win-win to me :)

Let me know what you think!

@dbohdan
Copy link
Owner

dbohdan commented Dec 28, 2017

All of this sounds good, except...

this would let people rely on the existing documentation and configuration options

Are you planning to have your own documentation and configuration options? It is worth looking at Eve and its configuration here as a model to imitate. It uses Flask underneath, doesn't hide it, and its website even has the unmistakable Flask theme :-), but you don't need to know Flask to configure the basics.

@obi1kenobi
Copy link
Author

I was thinking about using grift since it's very lightweight but still makes having multiple deploy configurations easy to do: https://github.com/kensho-technologies/grift

Eve seems neat but I think that model might be overkill in this case. One of the ideas of the GraphQL compiler is that it should just work -- there are literally no configuration options in it, so the only configuration I need to expose are things like the database connection info, and what IP/port to run the server on.

@dbohdan
Copy link
Owner

dbohdan commented Dec 29, 2017

To be clear, what individual components to use is totally up to you and your preferences. I don't want to influence that, because I am not going to be the one putting my work into the wrapper. My concern is only for the result to be approximately as user-friendly as Eve's settings.py (but it doesn't even have to be a .py).

the only configuration I need to expose are things like the database connection info, and what IP/port to run the server on

This sounds good.

@obi1kenobi
Copy link
Author

Great -- thanks for the feedback, much appreciated! I'll what I can put together after the holidays :)

@dbohdan
Copy link
Owner

dbohdan commented Dec 29, 2017

You're welcome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants