Graphqlator - A CLI program that generates a graphql-go server from an existing MySQL, MariaDB, or PostgresQL schema

blov · 2018-03-04 20:30:13 · 604 次点击    
这是一个分享于 2018-03-04 20:30:13 的资源,其中的信息可能已经有所发展或是发生改变。

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:

Neat

ahmedalhulaibi:

Thanks!

Did you get a chance to install and run graphqlator?

paul_h:

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.

ahmedalhulaibi:

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?


入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

604 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传