This project is a simple example of using ent with gqlgen to create a GraphQL API.
Run the following command to initialize the project:
make initOnce the initialization is complete, you can visit the GraphQL playground at http://localhost:8080/graphiql.
Try creating a user with the following mutation:
mutation createUser {
createUser(input: { name: "Michael" }) {
name
}
}Initialization is only required once, unless you wish to rebuild images. You can take the application up and down with:
make upand
make downTo generate ent code, run:
make generateTo generate an ent versioned migration, run:
make migrationRefer to the Makefile for other commands.