Skip to content

michaelcaulley/example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Example

This project is a simple example of using ent with gqlgen to create a GraphQL API.

Getting Started

Prerequisites

Running the project

Run the following command to initialize the project:

make init

Once 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 up

and

make down

Code Generation

To generate ent code, run:

make generate

To generate an ent versioned migration, run:

make migration

Other Commands

Refer to the Makefile for other commands.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published