Skip to content
This repository was archived by the owner on May 16, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d23f662
fix windows line endings not being ignored
Feb 7, 2019
7139210
Created gitlab-ci configuration
Apr 29, 2019
42c73a5
Renamed to apurebase
Apr 29, 2019
fedd803
Added publishing to bintray
Apr 29, 2019
b43b029
Added sourcesJar
Apr 29, 2019
8b1b7de
Merge pull request #1 from aPureBase/gitlab-ci
Apr 29, 2019
390cbae
small changes
Apr 29, 2019
3274904
Merge branch 'master' of github.com:aPureBase/KGraphQL
Apr 29, 2019
17c6ba2
Fixed extracting from arrays higher than one digit
Apr 29, 2019
8f7b33f
Support for suspendable property resolvers
Apr 29, 2019
6cdc747
Added AccessRule tests for PropertyDSL
Apr 29, 2019
c8bad06
Bumped version
Apr 29, 2019
f5b7a85
Merge pull request #2 from aPureBase/suspendable-resolvers
jeggy Apr 29, 2019
05cd62d
Fixed required arrays when parsing operation variables
Apr 29, 2019
3b56a94
Bumped version
Apr 29, 2019
cdc50ab
Merge pull request #3 from aPureBase/operation-variables-parsing
jeggy Apr 29, 2019
7046fa7
Added base docs
Apr 29, 2019
26f1ab8
Set theme jekyll-theme-cayman
jeggy Apr 29, 2019
6402959
Added jekyll documentation pages
Apr 29, 2019
950302a
Updated jekyll configuration
Apr 29, 2019
e3578b9
Fixed jekyll url configuration
Apr 29, 2019
4d33224
Updated gitlab-ci.yml cache configuration
Apr 29, 2019
31f4508
Re-ordered creating-schema
Apr 29, 2019
3624a53
Better documentation
Apr 29, 2019
8215825
Added grandparents to docs hierarchy
Apr 29, 2019
2c333b2
Merge branch 'master' of https://github.com/aPureBase/KGraphQL
May 17, 2019
580acc6
fix windows line endings in RequestPreProcessing, fix visibility
May 17, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 129 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,130 @@
build
.idea/.name
.idea/vcs.xml

# Created by https://www.gitignore.io/api/java,gradle,intellij+iml
# Edit at https://www.gitignore.io/?templates=java,gradle,intellij+iml

### Intellij+iml ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/modules.xml
# .idea/*.iml
# .idea/modules

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

# JetBrains templates
**___jb_tmp___

### Intellij+iml Patch ###
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023

*.iml
modules.xml
.idea/misc.xml
*.ipr

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*

### Gradle ###
.gradle
.idea
/out
build/

# Ignore Gradle GUI config
gradle-app.setting

# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar

# Cache of project
.gradletasknamecache

# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties

### Gradle Patch ###
**/build/

# End of https://www.gitignore.io/api/java,gradle,intellij+iml
65 changes: 65 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
image: gradle:alpine

stages:
- test
- publish

variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"

before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle



##############
# JOBS #
##############

build:
stage: test
cache:
paths:
- build
- .gradle
script:
- gradle assemble

test:
stage: test
cache:
paths:
- build
- .gradle
script:
- gradle jacocoTestReport coveralls

bintray:publish:
stage: publish
cache:
paths:
- build
- .gradle
script:
- ./gradlew bintrayUpload
only:
- tags

pages:
image: alpine/bundle:2.6.1
stage: publish
artifacts:
paths:
- public
cache:
paths:
- docs/vendor
variables:
JEKYLL_ENV: production
LC_ALL: C.UTF-8
script:
- cd docs
- bundle install --path vendor/bundle
- bundle exec jekyll build -d ../public
only:
- master
23 changes: 23 additions & 0 deletions .idea/runConfigurations/Run_Tests.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

33 changes: 14 additions & 19 deletions README.MD
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# KGraphQL

[![Build Status](https://travis-ci.org/pgutkowski/KGraphQL.svg?branch=master)](https://travis-ci.org/pgutkowski/KGraphQL)
[![codebeat badge](https://codebeat.co/badges/b26d3c87-7cd1-4358-93cd-45d395669bdc)](https://codebeat.co/projects/github-com-pgutkowski-kgraphql-master)
[![Coverage Status](https://coveralls.io/repos/github/pgutkowski/KGraphQL/badge.svg?branch=master)](https://coveralls.io/github/pgutkowski/KGraphQL?branch=master)
[![Download](https://api.bintray.com/packages/pgutkowski/Maven/KGraphQL/images/download.svg) ](https://bintray.com/pgutkowski/Maven/KGraphQL/_latestVersion)
[![Awesome Kotlin Badge](https://kotlin.link/awesome-kotlin.svg)](https://github.com/KotlinBy/awesome-kotlin)
[![Bintray](https://api.bintray.com/packages/apurebase/apurebase/kgraphql/images/download.svg)](https://bintray.com/apurebase/apurebase/kgraphql)

KGraphQL is [Kotlin](https://kotlinlang.org/) implementation of [GraphQL](http://graphql.org/). It provides rich DSL to setup GraphQL schema.

Expand Down Expand Up @@ -84,13 +79,13 @@ val schema = KGraphQL.schema {
Now, we can query our schema:
```kotlin
//query for hero from episode JEDI and take id, name for any Character, and primaryFunction for Droid or height for Human
schema.execute("{hero(episode: JEDI){
schema.execute("""{hero(episode: JEDI){
id
name
... on Droid{primaryFunction}
... on Human{height}
}
}")
}""")
```
Returns:
```json
Expand All @@ -107,13 +102,13 @@ Returns:
Query for all heroes:
```kotlin
//query for all heroes and take id, name for any Character, and primaryFunction for Droid or height for Human
schema.execute("{heroes {
schema.execute("""{heroes {
id
name
... on Droid{primaryFunction}
... on Human{height}
}
}")
}""")
```
Returns:
```json
Expand Down Expand Up @@ -145,17 +140,19 @@ KGraphQL is pushed to bintray repository and also linked to JCenter. It requires
Add Bintray JCenter repository to <repositories> section:

```
<repository>
<id>central</id>
<url>https://dl.bintray.com/pgutkowski/Maven</url>
</repository>
<repositories>
<repository>
<id>jcenter</id>
<url>https://jcenter.bintray.com/</url>
</repository>
</repositories>
```

Add dependency:

```
<dependency>
<groupId>com.github.pgutkowski</groupId>
<groupId>com.apurebase</groupId>
<artifactId>kgraphql</artifactId>
<version>${KGraphQLVersion}</version>
</dependency>
Expand All @@ -175,16 +172,14 @@ Add Bintray JCenter repository:

```
repositories {
maven {
url "https://dl.bintray.com/pgutkowski/Maven"
}
jcenter()
}
```

Add dependencies (you can also add other modules that you need):

```
compile 'com.github.pgutkowski:kgraphql:${KGraphQLVersion}'
compile 'com.apurebase:kgraphql:${KGraphQLVersion}'
```

And make sure that you use the right Kotlin version:
Expand Down
Loading