{"repo":"fasibio/autogql","free":true,"listed":false,"github":"https://github.com/fasibio/autogql","clone":"git clone https://github.com/fasibio/autogql.git","description":"CRUD SQL generator plugin for 99designs/gqlgen","language":"Go Template","stars":26,"topics":["gorm","gqlgen","graphql","orm"],"license":"MIT","category":"databases-storage","readme_excerpt":"AutoGql AutoGQL is a GraphQL GORM CRUD generator. It's a plugin for 99designs/gqlgen that helps you quickly create CRUD functionality for your application so you can focus on the unique aspects of your business Setup 1. Follow the steps from Gqlgen 2. Create a folder and add a inside. 3. Copy the following code into : 4. Install dependencies 5. Add a example autogql struct to 6. Run the following command to generate the GQLgen code: 7. Add SQL entity to struct at 8. Add SQL GORM Connection(SQLite used as an example) to : How to Use Autogql Autogql is designed to work similarly to gorm for declaring database tables and relations. To get started, it's helpful to familiarize yourself with how gorm models work: Little introduction At gorm you describe Database tables and relations like this With Autogql, you can describe GraphQL schemas and directives in the same way: In this example, the @SQL directive tells Autogql that this type should be mapped to a GORM model. The @SQL GORM directive specifies the corresponding GORM tag for the field. You can find more examples of Autogql schema descriptions in the test schema file. Autogql also allows you to define relationships between models using GORM's foreign key syntax: In this example, the userID field in the Cat type is a foreign key that points to the id field in the User type. The @SQL GORM directive can be used to specify GORM tags for relationships, as well as other constraints. To work with queries and mutations, Autogql will a","default_branch":null,"files":null,"tree":[],"storefront":"/r/fasibio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/fasibio/autogql/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}