Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 1 addition & 2 deletions docs/content/Installation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ weight: 1

[![Maven Central](https://img.shields.io/maven-central/v/de.stuebingerb/kgraphql.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22de.stuebingerb%22%20AND%20a:%22kgraphql%22)

KGraphQL is pushed to MavenCentral repository. It requires kotlin compiler version 1.4.x and require kotlin runtime of
the same version as a dependency.
KGraphQL is available from Maven Central.

=== "Kotlin Gradle Script"
Add Maven Central repository:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ First fetch the 10 people. Then loop through each of them and fetch their first
While what we would like is to fetch the first 10 people in 1 SQL and then fetch the first 5 friends for all those 10
people in the second query. That's what the `dataProperty` will solve for you.

### Setting up

=== "Example"
```kotlin
data class Person(val id: Int, val name: String)
Expand Down
4 changes: 2 additions & 2 deletions docs/content/Reference/Type System/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ provided via DSL.

## Type System Creation

KGraphQL is able to inspect operations and partially infer schema type system, so schema creator does not have to
explicitly declare every type (but it may if needed). Union and Scalars require explicit definition in Schema DSL.
KGraphQL is able to inspect operations and partially infer schema type system, so schema creators do not have to
explicitly declare every type (but may if needed). Union types and Scalars require explicit definition in Schema DSL.
Inferred classes are interpreted as GraphQL Object or Interface type.

## Object or Interface?
Expand Down
2 changes: 1 addition & 1 deletion docs/content/Reference/Type System/scalars.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ weight: 1
---

As defined by specification, scalar represents a primitive value in GraphQL. In KGraphQL, besides built-in scalar types,
client code can declare custom scalar type, which can coerce to `String`, `Boolean`, `Int`, `Long` or `Float` (`kotlin.Double`).
client code can declare custom scalar types, which can coerce to `String`, `Boolean`, `Int`, `Long` or `Float` (`kotlin.Double`).

KGraphQL provides a group of DSL methods to define scalars:

Expand Down
2 changes: 1 addition & 1 deletion docs/content/Reference/Type System/unions.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 3
GraphQL Unions represent an object that could be one of a list of GraphQL Object types, but provides for no guaranteed
fields between those types.

There are 2 ways of defining a union type.
There are 2 ways of defining a union type: manually, and via a sealed class.

### Manual Configuration

Expand Down
2 changes: 1 addition & 1 deletion docs/content/Reference/accessRule.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Access Rule

It's possible to add restriction unto your resolvers by using the `accessRule`.
It's possible to add restrictions unto your resolvers by using the `accessRule`.

=== "Example"
```kotlin
Expand Down
6 changes: 3 additions & 3 deletions docs/content/Reference/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ KGraphQL schema allows configuration of the following properties:
| documentParserCacheMaximumSize | Schema document cache maximum size | `1000` |
| objectMapper | Schema is using Jackson ObjectMapper from this property | result of `jacksonObjectMapper()` from [jackson-kotlin-module](https://github.com/FasterXML/jackson-module-kotlin) |
| acceptSingleValueAsArray | Schema accepts single argument values as singleton list | `true` |
| coroutineDispatcher | Schema is using CoroutineDispatcher from this property | [CommonPool](https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/src/main/kotlin/kotlinx/coroutines/experimental/CommonPool.kt) |
| genericTypeResolver | Schema is using generic type resolver from this property | [GenericTypeResolver.DEFAULT](https://github.com/aPureBase/KGraphQL/blob/master/kgraphql/src/main/kotlin/com/apurebase/kgraphql/schema/execution/GenericTypeResolver.kt) |
| wrapErrors | Schema wraps exceptions from resolvers as GraphQLError | `true` |
| coroutineDispatcher | Schema is using CoroutineDispatcher from this property | [Dispatchers.Default](https://github.com/Kotlin/kotlinx.coroutines/blob/master/kotlinx-coroutines-core/jvm/src/Dispatchers.kt) |
| genericTypeResolver | Schema is using generic type resolver from this property | [GenericTypeResolver.DEFAULT](https://github.com/stuebingerb/KGraphQL/blob/main/kgraphql/src/main/kotlin/com/apurebase/kgraphql/schema/execution/GenericTypeResolver.kt) |
| wrapErrors | Schema wraps exceptions from resolvers as GraphQLError | |
| introspection | Schema allows introspection (also affects SDL). Introspection can be disabled in production to reduce attack surface. | `true` |

=== "Example"
Expand Down
2 changes: 1 addition & 1 deletion docs/content/Reference/deprecation.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Schema creators are able to deprecate fields, operations, enum values, and input
elements expose method `deprecate(reason: String)`. Deprecation is visible in schema introspection system with fields
`isDeprecated: Boolean` and `deprecationReason: String`.

Input values may only be deprecated if they are not required, cf. [3.13.3@deprecated](https://spec.graphql.org/draft/#sec--deprecated).
Input values may only be deprecated if they are not required, cf. [3.13.3@deprecated](https://spec.graphql.org/September2025/#sec--deprecated).

=== "Example"
```kotlin
Expand Down
12 changes: 6 additions & 6 deletions docs/content/Reference/resolver.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
## Basics

In GraphQL every property needs a resolver. The resolver is the piece of system logic, required to resolve the response
graph. [Operations](operations.md), [Extension
Properties](Type%20System/objects-and-interfaces.md/#extension-properties) and [Union Properties](Type%20System/unions.md) accept resolver, which allows schema creator to configure schema behaviour.
graph. [Operations](operations.md), [Extension Properties](Type%20System/objects-and-interfaces.md/#extension-properties) and [Union Properties](Type%20System/unions.md) accept resolver, which allows
schema creators to configure schema behaviour.

Resolver clause accepts kotlin function and returns its DSL item, which is entry point for additional customization of
resolver
resolver:

=== "Example"
```kotlin
Expand All @@ -21,8 +21,8 @@ resolver
`withArgs` closure exposes single method `arg`

**arg { }**
`arg` exposes possibility to customize argument default value. Default value is automatically used if query doesn't
provide any. it is matched by argument name.
`arg` exposes the possibility to customize argument default values. The default value is automatically used if query doesn't
provide any, and is matched by argument name.

=== "Example"
```kotlin
Expand All @@ -37,7 +37,7 @@ provide any. it is matched by argument name.

## Context

To get access to the context object, you can just request for the `Context` object within your resolver.
To get access to the context object, you can request for the `Context` object within your resolver.

When providing `Context` as an argument for your resolver, it will be skipped and not published to your API, but
KGraphQL will make sure to provide it to the resolver, so you can use it like the following example:
Expand Down
Loading