<story><title>Building a High Performance Data Integration Framework in Go</title><url>https://www.cloudquery.io/blog/building-cloudquery</url></story><parent_chain><item><author>Xeoncross</author><text>Code generation is becoming really important in Go.&lt;p&gt;Why even use an ORM when &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;sqlc.dev&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;sqlc.dev&amp;#x2F;&lt;/a&gt; will generate everything from vanilla SQL?&lt;p&gt;Why make the frontend team write a Typescript client when &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;goa.design&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;goa.design&lt;/a&gt; on the backend will produce an OpenAPI schema they can just point a &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;openapi-generator.tech&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;openapi-generator.tech&lt;/a&gt; at?&lt;p&gt;Why write out GraphQL boilerplate when &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;99designs&amp;#x2F;gqlgen&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;99designs&amp;#x2F;gqlgen&lt;/a&gt; will take your GQL typedef and generate it all for you based on how you want it to look.&lt;p&gt;Why write validation rules when you can just define your input struct and let &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mustafaakin&amp;#x2F;gongular&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mustafaakin&amp;#x2F;gongular&lt;/a&gt; generate the rest for you?&lt;p&gt;Honestly, I&amp;#x27;m loving this. I want to focus on the entities and business logic - not writing yet another handler&amp;#x2F;resolver for basic auth + CRUD work.</text></item></parent_chain><comment><author>ilyt</author><text>It&amp;#x27;s real shame it&amp;#x27;s &lt;i&gt;kinda&lt;/i&gt; bad language for it. Looking at what people did with Rust macros it&amp;#x27;s shame that Go code generation story is either &amp;quot;just run some random binaries to compile stuff&amp;quot; or &amp;quot;put code instructing the compiler to do stuf in &lt;i&gt;fucking comments&lt;/i&gt;&amp;quot;&lt;p&gt;And I say it without being sarcastic but Go makes me miss C preprocessor and nothing should make anyone miss C preprocessor.</text></comment>
<story><title>Building a High Performance Data Integration Framework in Go</title><url>https://www.cloudquery.io/blog/building-cloudquery</url></story><parent_chain><item><author>Xeoncross</author><text>Code generation is becoming really important in Go.&lt;p&gt;Why even use an ORM when &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;sqlc.dev&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;sqlc.dev&amp;#x2F;&lt;/a&gt; will generate everything from vanilla SQL?&lt;p&gt;Why make the frontend team write a Typescript client when &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;goa.design&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;goa.design&lt;/a&gt; on the backend will produce an OpenAPI schema they can just point a &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;openapi-generator.tech&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;openapi-generator.tech&lt;/a&gt; at?&lt;p&gt;Why write out GraphQL boilerplate when &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;99designs&amp;#x2F;gqlgen&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;99designs&amp;#x2F;gqlgen&lt;/a&gt; will take your GQL typedef and generate it all for you based on how you want it to look.&lt;p&gt;Why write validation rules when you can just define your input struct and let &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mustafaakin&amp;#x2F;gongular&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;mustafaakin&amp;#x2F;gongular&lt;/a&gt; generate the rest for you?&lt;p&gt;Honestly, I&amp;#x27;m loving this. I want to focus on the entities and business logic - not writing yet another handler&amp;#x2F;resolver for basic auth + CRUD work.</text></item></parent_chain><comment><author>leetbulb</author><text>Check out Ent &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;entgo.io&amp;#x2F;docs&amp;#x2F;code-gen&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;entgo.io&amp;#x2F;docs&amp;#x2F;code-gen&lt;/a&gt;&lt;p&gt;Pretty easy to generate GraphQL (most fully featured extension), OpenAPI, Protobuf, etc. from your database schema. Ent also makes it easy to implement your own generators (e.g. OAS, glue logic, etc).</text></comment>