Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue/7 implicit null #23

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
📝 update readme
yshrsmz committed Jul 19, 2019

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 31c15108de686596bebaed3053ee90a72249a429
104 changes: 5 additions & 99 deletions README.md
Original file line number Diff line number Diff line change
@@ -22,6 +22,9 @@ kgql requires Gradle __5.3.1 or later__

Supported GraphQL file extension: `.gql` or `.graphql`

You need `schema.json` file which you can get via [introspection query](https://graphql.org/learn/introspection/).
You can use tools like [graphql-cli/graphql-cli](https://github.com/graphql-cli/graphql-cli).

#### For Android Project

```gradle
@@ -50,7 +53,7 @@ kgql {
// mapper for non-scalar type
"UserProfile": "com.sample.data.UserProfile"
]
schemaJson = file("src/main/kgql/schema.json) // defaults to "src/main/kgql"
schemaJson = file("src/main/kgql/schema.json) // defaults to "src/main/kgql/schema.json"
}
```

@@ -81,7 +84,7 @@ kgql {
// mapper for non-scalar type
"UserProfile": "com.sample.data.UserProfile"
]
schemaJson = file("src/main/kgql/schema.json) // defaults to "src/main/kgql"
schemaJson = file("src/main/kgql/schema.json) // defaults to "src/main/kgql/schema.json"
}
```

@@ -208,103 +211,6 @@ class GitHubApi {

```


## Introspection Query

```graphql
query IntrospectionQuery {
__schema {
queryType { name }
mutationType { name }
subscriptionType { name }
types {
...FullType
}
directives {
name
description
locations
args {
...InputValue
}
}
}
}

fragment FullType on __Type {
kind
name
description
fields(includeDeprecated: true) {
name
description
args {
...InputValue
}
type {
...TypeRef
}
isDeprecated
deprecationReason
}
inputFields {
...InputValue
}
interfaces {
...TypeRef
}
enumValues(includeDeprecated: true) {
name
description
isDeprecated
deprecationReason
}
possibleTypes {
...TypeRef
}
}

fragment InputValue on __InputValue {
name
description
type { ...TypeRef }
defaultValue
}

fragment TypeRef on __Type {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
ofType {
kind
name
}
}
}
}
}
}
}
}
```

## Credits

This library is highly inspired by [squareup/sqldelight](https://github.com/squareup/sqldelight) and the gradle plugin and basic idea is heavily based on it. Thanks for this.