Create an .lein-env
file at the root.
{:db-type "postgres"
:db-name "postgres"
:db-user "postgres"
:db-host "localhost"
:db-password "postgres"}
$ lein run
Request URL - http://localhost:3000/graphql
query {
users {
id
name
}
}
- Response
[
{
"id":1,
"name":"myungjaeyu"
}
]
query {
user(id: 1) {
id
name
}
}
- Response
{
"id":1,
"name":"myungjaeyu"
}
mutation {
createUser(name: "myungjaeyu") {
id
name
}
}
- Response
{
"id":1,
"name":"myungjaeyu"
}