Skip to content

u4bi-dev/clojure-gql-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clojure-gql-starter

Usage

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

GraphQL Specification

Query users

query { 
    users { 
        id
        name 
    } 
}
  • Response
[
    {
        "id":1,
        "name":"myungjaeyu"
    }
]

Query user

query {
    user(id: 1) {
        id
        name
    }
}
  • Response
{
    "id":1,
    "name":"myungjaeyu"
}

Mutation createUser

mutation {
    createUser(name: "myungjaeyu") {
        id
        name
    }
}
  • Response
{
    "id":1,
    "name":"myungjaeyu"
}

About

clojure-gql-starter

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published