Skip to content

Commit

Permalink
Update README and bump version to 0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
VerachadW committed Sep 27, 2016
1 parent ed52ba2 commit 63e68cb
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ env:
- secure: E2jm3qJrcyavBwWkBQxqKrLjprl4QRT3vGtX87HyEzCYAveh+bdiY+gvu0q+RoFhAklzSEJnND5vBDbHD4gzV9bx9UdafrPzwKFEWt3ZcVGI70JEYHfcID0jzQ6pI7LismrTOpVkHyUZudBnG3yNh6PxID8890I5IMPHInvvVMUDhJ+jpLtjnn5HnRLVIEOX1A368pQoqiAKvSPuIHmDdFofYbAlgprWEtkrpdLd/1Yp95yrE5EjC6nwjhvG2LHiKTr5FgAWD9/owmemioBnexSxEgZe76cRm38WDQVWpEppp7FHJ7eo0LhtEBXYUXJX2UE6W5A0rRBfRRoOCa8eABmY2kxsm5TajlA7yrxqeQebuvcQzVmSjPJ3t7JLkgcYMI88HbpvKjhA5fFVi8TeThd85wXp58eQkIU/7EoLPaqALUHw8WCAaBOmcQ37MLeSk6oX8SQUS0owo58guh1SN95BpTrMuzvvN4V9LPGNMfnVBxuKjnfOxxPkBWLEsuvgGwdC9pYj3dDYVDD7igrGy5qTwTJ8qTtqud3uUY0JVzpPpN6m3IKI0qxEOYTDS3WrJh14P8flFZXYU/Vot1xkmZPMlAAqYxdRWLnNAjwS+c8VePKqZmIp3FVxFyrs9yJehFWynB0ZYi3ZUtc0UKkoIKLocMi1huHgAmRrJbteN9Y=

deploy:
provider: script
script: ./gradlew clean build bintrayUpload -PdryRun=false
- provider: script
skip_cleanup: true
script: ./gradlew build bintrayUpload -PdryRun=false
on:
branch: master
tags: true
57 changes: 53 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,56 @@
# KraphQL [![Build Status](https://travis-ci.org/taskworld/kraph.svg?branch=master)](https://travis-ci.org/taskworld/kraph) [ ![Download](https://api.bintray.com/packages/tw/maven/kraph/images/download.svg) ](https://bintray.com/tw/maven/kraph/_latestVersion)
GraphQL query builder written in Kotlin
# Kraph [![Build Status](https://travis-ci.org/taskworld/kraph.svg?branch=master)](https://travis-ci.org/taskworld/kraph) [ ![Download](https://api.bintray.com/packages/tw/maven/kraph/images/download.svg) ](https://bintray.com/tw/maven/kraph/_latestVersion)
In short, this is a GraphQL request JSON body builder for Kotlin. It will generate the JSON string for request body that work with GraphQL Server. For example, we have the GraphQL query for list all the notes.
```
query {
notes {
id
createdDate
content
author {
name
avatarUrl(size: 100)
}
}
}
```
And here is how we write it in Kotlin using Kraph.
```
Kraph {
query {
fieldObject("notes") {
field("id")
field("createdDate")
field("content")
fieldObject("author") {
field("name")
field("avatarUrl", mapOf("size" to 100))
}
}
}
}
```
As you can see, we can achieve our goal with just a few tweaks from the original query.

**NOTE:** Kraph is still in an early stage. The usage may change in further development.

Note that this library is still in alpha stage. The syntax usage may subject to change. Please see the example from unit tests file for now.
### Features
- DSL builder style. Make it easier to read and use.
- Support both Query and Mutation operation.

Any feedback and/or PRs is welcome.
### Set up
Adding Kraph to `build.gradle`
```
repositories {
jcenter()
}
dependencies {
compile "com.taskworld.kraph:kraph:x.y.z"
}
```

### Usage
Please see the example from `sample` folder for now. We will update this part ASAP.

### Contributing to Kraph
We use Github issues for tracking bugs and requests. Any feedback and/or PRs is welcome.
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
buildscript {
ext {
publish_version = '0.1.0'
publish_version = '0.2.0'

bintray_plugin_version = '0.3.4'

Expand Down

0 comments on commit 63e68cb

Please sign in to comment.