GraphQL Playground written by Go.
$ make server
erDiagram
users {
integer id PK "gorm.Model"
datetime created_at "gorm.Model"
datetime updated_at "gorm.Model"
datetime deleted_at "gorm.Model"
text name
text email
numeric is_active
}
mutation createUser {
createUser(input: {
name: "name-f",
email: "[email protected]",
is_active: true
}) {
id
name
email
is_active
}
}
query readUser {
user(is_active: true) {
id
name
email
is_active
}
}
mutation updateUser {
updateUser(input: {
id: 6,
name: "name-f",
email: "[email protected]",
is_active: false
}) {
id
name
email
is_active
}
}
mutation deleteUser {
deleteUser(input: {
id: 6
}) {
id
name
email
is_active
}
}
graph BT;
Database-- response -->ORM;
ORM-- request -->Database;
ORM-- response -->GraphQL;
GraphQL-- request -->ORM;
GraphQL-- response -->User;
User-- request -->GraphQL;
.
├── .gitignore : system
├── dev.db : human
├── go.mod : system
├── go.sum : system
├── gqlgen.yml : system
├── graph : system
│ ├── generated.go : system
│ ├── helper.go : human
│ ├── model : system
│ │ └── models_gen.go : system
│ ├── resolver.go : human
│ ├── schema.graphqls : human
│ └── schema.resolvers.go : system/human
├── LICENSE : system
├── Makefile : human
├── migrate.go : human
├── README.md : human
├── server.go : system
└── tools.go : system
-
generate
$ make generate
-
$ make migrate