DEV Community

Discussion on: ‌How To Create GraphQL Server With Golang

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?

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: I think This is a good topic to extend the tutorial :). Thanks.