DEV Community

loading...

Discussion on: ‌How To Create GraphQL Server With Golang

Collapse
wasphin profile image
Xiaofeng Wang

Thanks for sharing, really a great example!
As you just get all the fields from the database, is there any libraries which can turn GraphQL queries into SQL sentences based on the queried fields and condition?

Collapse
glyphack profile image
Shayegan Hooshyari Author

There is a way to do this. actually I don't thinks it's the library job to do the thing but you got a point there. gqlgen supports this by giving you the requested fields. here is the relative MR: github.com/99designs/gqlgen/pull/65. I think This is a good topic to extend the tutorial :). Thanks.