Hello Gophers,
I'm new here, been mostly lurking for the past few months. I've written an open-source CLI tool that generates a GraphQL API server.
It does this by connecting to your database instance and querying the Information Schema to extract column, relationship and constraints. Using that information it is possible to generate a GraphQL API.
Git Repo Link to Website with short tutorial
This is my first real Go application, and my first open source project. The generated code works, but I would not call it feature complete. For example by default the generated queries are read-only and will only retrieve the first row in the database. Working on changing this, just need to put in the time.
The package that drives all the database introspection and code generation is called Substance. Definitely looking for feedback for this package, especially in terms of the package organization and package design in general. All this code is very much a work in progress, but I wanted to share mainly to get feedback and see if anyone is interested in contributing.
评论:
waiting4op2deliver:
ahmedalhulaibi:Neat
paul_h:Thanks!
Did you get a chance to install and run graphqlator?
ahmedalhulaibi:Website should probably link to GH repo (I couldn't find that link - if it is there it should be more obvious).
You should probably extract templates for the generated Go source.
Good work though - keep going.
Thanks for taking the time to reply!
Ah good catch. I'll make sure to add the link in there.
What do you mean by extract templates for the generated Go source?
