Skip to content

nimaai/lacinia-ring

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

try-lacinia

Playing with walmartlabs/lacinia library, a GraphQL implementation in pure Clojure.

Usage

Start web service at port 3000

lein run

GraphiQL services at http://localhost:3000/

Query, Mutation

Send POST requests to /graphql url with query data

curl http://localhost:3000/graphql \
  -X POST \
  -H "Content-Type: application/graphql" \
  -d '{hero {id name friends {name}}}'
==>
{
    "data": {
        "hero": {
            "friends": [
                {
                    "name": "Luke Skywalker"
                }, 
                {
                    "name": "Han Solo"
                }, 
                {
                    "name": "Leia Organa"
                }
            ], 
            "id": "2001", 
            "name": "R2-D2"
        }
    }
}


curl http://localhost:3000/graphql \
  -X POST \
  -H "Content-Type: application/graphql" \
  -d '{human(id: "1001") {name}}'
==>
{
    "data": {
        "human": {
            "name": "Darth Vader"
        }
    }
}

Subscription

Send query message to ws://localhost:3000/graphql-ws

subscription { ping (count: 4 message: "test") { message }}

License

Copyright © 2017 FIXME

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Clojure 63.0%
  • HTML 37.0%