<p>Hello Gophers,</p>
<p>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.</p>
<p>It does this by connecting to your database instance and querying the <a href="https://dev.mysql.com/doc/refman/5.7/en/information-schema.html">Information Schema</a> to extract column, relationship and constraints. Using that information it is possible to generate a GraphQL API.</p>
<p><a href="https://github.com/ahmedalhulaibi/graphqlator">Git Repo</a>
<a href="https://ahmedalhulaibi.github.io/graphqlator-website/">Link to Website with short tutorial</a></p>
<p>This is my first <em>real</em> 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.</p>
<p>The package that drives all the database introspection and code generation is called <a href="https://github.com/ahmedalhulaibi/substance">Substance</a>. 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. </p>
<hr/>**评论:**<br/><br/>waiting4op2deliver: <pre><p>Neat</p></pre>ahmedalhulaibi: <pre><p>Thanks!</p>
<p>Did you get a chance to install and run graphqlator?</p></pre>paul_h: <pre><p>Website should probably link to GH repo (I couldn't find that link - if it is there it should be more obvious).</p>
<p>You should probably extract templates for the generated Go source.</p>
<p>Good work though - keep going.</p></pre>ahmedalhulaibi: <pre><p>Thanks for taking the time to reply!</p>
<p>Ah good catch. I'll make sure to add the link in there.</p>
<p>What do you mean by extract templates for the generated Go source? </p></pre>
