diff --git a/docs/content/Installation/index.md b/docs/content/Installation/index.md index dec94d7a..2e6c310e 100644 --- a/docs/content/Installation/index.md +++ b/docs/content/Installation/index.md @@ -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: diff --git a/docs/content/Reference/Type System/objects-and-interfaces.md b/docs/content/Reference/Type System/objects-and-interfaces.md index d39a28cd..105dffe7 100644 --- a/docs/content/Reference/Type System/objects-and-interfaces.md +++ b/docs/content/Reference/Type System/objects-and-interfaces.md @@ -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) diff --git a/docs/content/Reference/Type System/overview.md b/docs/content/Reference/Type System/overview.md index b154fc21..4157a5b8 100644 --- a/docs/content/Reference/Type System/overview.md +++ b/docs/content/Reference/Type System/overview.md @@ -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? diff --git a/docs/content/Reference/Type System/scalars.md b/docs/content/Reference/Type System/scalars.md index 5899f9a2..16b8a792 100644 --- a/docs/content/Reference/Type System/scalars.md +++ b/docs/content/Reference/Type System/scalars.md @@ -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: diff --git a/docs/content/Reference/Type System/unions.md b/docs/content/Reference/Type System/unions.md index b90ae715..ba548049 100644 --- a/docs/content/Reference/Type System/unions.md +++ b/docs/content/Reference/Type System/unions.md @@ -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 diff --git a/docs/content/Reference/accessRule.md b/docs/content/Reference/accessRule.md index f74fe6f1..3f18e2d6 100644 --- a/docs/content/Reference/accessRule.md +++ b/docs/content/Reference/accessRule.md @@ -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 diff --git a/docs/content/Reference/configuration.md b/docs/content/Reference/configuration.md index 9bd11658..c6326865 100644 --- a/docs/content/Reference/configuration.md +++ b/docs/content/Reference/configuration.md @@ -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" diff --git a/docs/content/Reference/deprecation.md b/docs/content/Reference/deprecation.md index c1fb51f4..4a794d44 100644 --- a/docs/content/Reference/deprecation.md +++ b/docs/content/Reference/deprecation.md @@ -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 diff --git a/docs/content/Reference/resolver.md b/docs/content/Reference/resolver.md index 9d4d0107..ca8021d2 100644 --- a/docs/content/Reference/resolver.md +++ b/docs/content/Reference/resolver.md @@ -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 @@ -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 @@ -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: