diff --git a/RELEASING.md b/RELEASING.md index 965ec698f9..41740c9b68 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -1,4 +1,4 @@ -In order to [release a new version](https://github.com/ExpediaDotCom/graphql-kotlin/releases) we simply need to draft a new release +In order to [release a new version](https://github.com/ExpediaDotCom/graphql-kotlin/releases) we need to draft a new release and tag the commit. Releases are following [semantic versioning](https://semver.org/) and specify major, minor and patch version. Once release is published it will trigger corresponding [Github Action](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/.github/workflows/release.yml) diff --git a/generator/graphql-kotlin-federation/README.md b/generator/graphql-kotlin-federation/README.md index 9a3efb957f..4cf0a7dec4 100644 --- a/generator/graphql-kotlin-federation/README.md +++ b/generator/graphql-kotlin-federation/README.md @@ -15,7 +15,7 @@ See more ## Installation -Using a JVM dependency manager, simply link `graphql-kotlin-federation` to your project. +Using a JVM dependency manager, link `graphql-kotlin-federation` to your project. With Maven: diff --git a/generator/graphql-kotlin-schema-generator/README.md b/generator/graphql-kotlin-schema-generator/README.md index cd6d34fa2a..2373702924 100644 --- a/generator/graphql-kotlin-schema-generator/README.md +++ b/generator/graphql-kotlin-schema-generator/README.md @@ -10,7 +10,7 @@ For information on `graphql-java`, please visit [GraphQL Java](https://www.graph ## Installation -Using a JVM dependency manager, simply link `graphql-kotlin-schema-generator` to your project. +Using a JVM dependency manager, link `graphql-kotlin-schema-generator` to your project. With Maven: diff --git a/servers/graphql-kotlin-server/src/main/kotlin/com/expediagroup/graphql/server/extensions/dataFetchingEnvironmentExtensions.kt b/servers/graphql-kotlin-server/src/main/kotlin/com/expediagroup/graphql/server/extensions/dataFetchingEnvironmentExtensions.kt index d4dbccdda1..7ad52955d7 100644 --- a/servers/graphql-kotlin-server/src/main/kotlin/com/expediagroup/graphql/server/extensions/dataFetchingEnvironmentExtensions.kt +++ b/servers/graphql-kotlin-server/src/main/kotlin/com/expediagroup/graphql/server/extensions/dataFetchingEnvironmentExtensions.kt @@ -21,7 +21,7 @@ import graphql.schema.DataFetchingEnvironment import java.util.concurrent.CompletableFuture /** - * Helper method to simply get a value from a registered DataLoader. + * Helper method to get a value from a registered DataLoader. * The provided key should be the cache key object used to save the value for that particular data loader. */ fun DataFetchingEnvironment.getValueFromDataLoader(dataLoaderName: String, key: K): CompletableFuture { diff --git a/servers/graphql-kotlin-spring-server/README.md b/servers/graphql-kotlin-spring-server/README.md index 7b990550a8..bfad5dec25 100644 --- a/servers/graphql-kotlin-spring-server/README.md +++ b/servers/graphql-kotlin-spring-server/README.md @@ -7,7 +7,7 @@ ## Installation -Using a JVM dependency manager, simply link `graphql-kotlin-spring-server` to your project. +Using a JVM dependency manager, link `graphql-kotlin-spring-server` to your project. With Maven: @@ -35,7 +35,7 @@ graphql: - "com.your.package" ``` -In order to expose your queries, mutations and subscriptions in the GraphQL schema you simply need to implement corresponding marker interfaces and they will be automatically picked up by `graphql-kotlin-spring-server` autoconfiguration library. +In order to expose your queries, mutations and subscriptions in the GraphQL schema you need to implement corresponding marker interfaces and they will be automatically picked up by `graphql-kotlin-spring-server` autoconfiguration library. ```kotlin @Component diff --git a/website/docs/assets/spring-initializer.png b/website/docs/assets/spring-initializer.png index 7ad7c22ae2..bfd4a6301d 100644 Binary files a/website/docs/assets/spring-initializer.png and b/website/docs/assets/spring-initializer.png differ diff --git a/website/docs/getting-started.mdx b/website/docs/getting-started.mdx index cc6eea426d..fa316ca748 100644 --- a/website/docs/getting-started.mdx +++ b/website/docs/getting-started.mdx @@ -11,7 +11,7 @@ GraphQL Kotlin is a collection of libraries, built on top of [graphql-java](http ## Installation -Using a JVM dependency manager, simply link any `graphql-kotlin-*` library to your project. +Using a JVM dependency manager, link any `graphql-kotlin-*` library to your project. -```xml + - - com.expediagroup - graphql-kotlin-federation - ${latestVersion} - + ```kotlin + implementation("com.expediagroup", "graphql-kotlin-federation", latestVersion) + ``` -``` + + -With Gradle: + ```xml + + com.expediagroup + graphql-kotlin-federation + ${latestVersion} + + ``` -```kotlin - -implementation("com.expediagroup", "graphql-kotlin-federation", latestVersion) - -``` + + ## Usage @@ -46,7 +58,7 @@ compliant schemas. ### `toFederatedSchema` -Just like the basic [toSchema](../schema-generator-getting-started.md), `toFederatedSchema` accepts four parameters: `config`, `queries`, `mutations` and `subscriptions`. +Just like the basic [toSchema](../schema-generator-getting-started.mdx), `toFederatedSchema` accepts four parameters: `config`, `queries`, `mutations` and `subscriptions`. The difference is that the `config` class is of type [FederatedSchemaGeneratorConfig](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/generator/graphql-kotlin-federation/src/main/kotlin/com/expediagroup/graphql/generator/federation/FederatedSchemaGeneratorConfig.kt). This class extends the [base configuration class](../customizing-schemas/generator-config.md) and adds some default logic. You can override the logic if needed, but do so with caution as you may no longer generate a spec compliant schema. diff --git a/website/docs/schema-generator/schema-generator-getting-started.md b/website/docs/schema-generator/schema-generator-getting-started.mdx similarity index 85% rename from website/docs/schema-generator/schema-generator-getting-started.md rename to website/docs/schema-generator/schema-generator-getting-started.mdx index ecb020123d..61150e507c 100644 --- a/website/docs/schema-generator/schema-generator-getting-started.md +++ b/website/docs/schema-generator/schema-generator-getting-started.mdx @@ -1,37 +1,48 @@ --- id: schema-generator-getting-started -title: Getting Started with the Schema Generator +title: Getting Started --- -## Install - -Using a JVM dependency manager, simply link `graphql-kotlin-schema-generator` to your project. -With Maven: +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; -```xml +## Install - - com.expediagroup - graphql-kotlin-schema-generator - ${latestVersion} - +Using a JVM dependency manager, link `graphql-kotlin-schema-generator` to your project. -``` + -With Gradle: + ```kotlin - implementation("com.expediagroup", "graphql-kotlin-schema-generator", latestVersion) +``` + + + +```xml + + com.expediagroup + graphql-kotlin-schema-generator + ${latestVersion} + ``` + + + ## Usage `graphql-kotlin-schema-generator` provides a single function, `toSchema`, to generate a schema from Kotlin objects. ```kotlin - data class Widget(val id: Int, val value: String) class WidgetQuery { @@ -53,13 +64,11 @@ val schema = toSchema( queries = listOf(TopLevelObject(widgetQuery)), mutations = listOf(TopLevelObject(widgetMutation)) ) - ``` will generate: ```graphql - schema { query: Query mutation: Mutation @@ -77,7 +86,6 @@ type Widget { id: Int! value: String! } - ``` Any `public` functions defined on a query, mutation, or subscription Kotlin class will be translated into GraphQL fields on the object @@ -96,14 +104,13 @@ custom hooks, supported packages, and name overrides. See the [Generator Configu You can see the definition for `toSchema` [in the source](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/generator/graphql-kotlin-schema-generator/src/main/kotlin/com/expediagroup/graphql/generator/toSchema.kt) -## Class `TopLevelObject` +## `TopLevelObject` `toSchema` uses Kotlin reflection to build a GraphQL schema from given classes using `graphql-java`'s schema builder. We don't just pass a `KClass` though, we have to actually pass an object, because the functions on the object are transformed into the data fetchers. In most cases, a `TopLevelObject` can be constructed with just an object: ```kotlin - class Query { fun getNumber() = 1 } @@ -111,21 +118,20 @@ class Query { val topLevelObject = TopLevelObject(Query()) toSchema(config = config, queries = listOf(topLevelObject)) - ``` In the above case, `toSchema` will use `topLevelObject::class` as the reflection target, and `Query` as the data fetcher target. + +### Dynamic `TopLevelObject` In a lot of cases, such as with Spring AOP, the object (or bean) being used to generate a schema is a dynamic proxy. In this case, `topLevelObject::class` is not `Query`, but rather a generated class that will confuse the schema generator. To specify the `KClass` to use for reflection on a proxy, pass the class to `TopLevelObject`: ```kotlin - @Component class Query { - @Timed fun getNumber() = 1 } @@ -133,5 +139,4 @@ val query = getObjectFromBean() val customDef = TopLevelObject(query, Query::class) toSchema(config, listOf(customDef)) - ``` diff --git a/website/docs/server/spring-server/spring-beans.md b/website/docs/server/spring-server/spring-beans.md index 29b006012b..3595d92353 100644 --- a/website/docs/server/spring-server/spring-beans.md +++ b/website/docs/server/spring-server/spring-beans.md @@ -16,7 +16,11 @@ Many of the beans are conditionally created and the default behavior can be cust ## Non-Federated Schema -_Created only if federation is disabled_ +:::note + +_Created only if federation is **disabled**_ + +::: | Bean | Description | | :-------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | @@ -25,7 +29,11 @@ _Created only if federation is disabled_ ## Federated Schema -_Created only if federation is enabled_ +:::note + +_Created only if federation is **enabled**_ + +::: | Bean | Description | | :------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | @@ -50,8 +58,12 @@ _Created only if federation is enabled_ ## Subscriptions +:::note + _Created only if the `Subscription` marker interface is used_ +::: + | Bean | Description | | :-------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SpringGraphQLSubscriptionHandler | Spring reactor code for executing GraphQL subscriptions requests | diff --git a/website/docs/server/spring-server/spring-http-request-response.md b/website/docs/server/spring-server/spring-http-request-response.md new file mode 100644 index 0000000000..db9acb61ea --- /dev/null +++ b/website/docs/server/spring-server/spring-http-request-response.md @@ -0,0 +1,7 @@ +--- +id: spring-http-request-response +title: HTTP Request and Response +--- + +To access the HTTP request and response methods, use [Spring WebFilter](https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/server/WebFilter.html). +From these filters you can modify the request and response, both before and after the GraphQL execution. diff --git a/website/docs/server/spring-server/spring-overview.mdx b/website/docs/server/spring-server/spring-overview.mdx index f0452d1d31..19ceb2b448 100644 --- a/website/docs/server/spring-server/spring-overview.mdx +++ b/website/docs/server/spring-server/spring-overview.mdx @@ -13,7 +13,7 @@ web server. ## WebFlux vs WebMVC This library is built on a [Spring WebFlux (reactive)](https://docs.spring.io/spring/docs/current/spring-framework-reference/web-reactive.html) stack which is a non-blocking alternative to a traditional [Spring Web MVC (servlet)](https://docs.spring.io/spring/docs/current/spring-framework-reference/web.html) based stack. -Since both frameworks utilize different threading models they cannot and should not be intermixed. +Since the frameworks utilize different threading models they cannot and should not be intermixed. When building a GraphQL server using `graphql-kotlin-spring-server` all your queries and mutations should follow one of the supported [asynchronous execution models](../../schema-generator/execution/async-models.md). ## Setup @@ -60,72 +60,9 @@ specify a list of supported packages that can be scanned for exposing your schem You can do this through the spring application config or by overriding the `SchemaGeneratorConfig` bean. See customization below. ```yaml - graphql: packages: - "com.your.package" - -``` - -## Writing Schema Code - -In order to expose your queries, mutations, and/or subscriptions in the GraphQL schema, implement -corresponding marker interface and they will be automatically picked up by `graphql-kotlin-spring-server` -auto-configuration library. - -```kotlin - -@Component -class MyAwesomeQuery : Query { - fun myAwesomeQuery(): Widget { ... } -} - -@Component -class MyAwesomeMutation : Mutation { - fun myAwesomeMutation(widget: Widget): Widget { ... } -} - -@Component -class MyAwesomeSubscription : Subscription { - fun myAwesomeSubscription(): Publisher { ... } -} - -data class Widget(val id: Int, val value: String) - -``` - -The above code will result in a GraphQL server with following schema: - -```graphql - -schema { - query: Query - mutation: Mutation - subscription: Subscription -} - -type Query { - myAwesomeQuery: Widget! -} - -type Mutation { - myAwesomeMutation(widget: WidgetInput!): Widget! -} - -type Subscription { - myAwesomeSubscription: Widget! -} - -type Widget { - id: Int! - value: String! -} - -input WidgetInput { - id: Int! - value: String! -} - ``` ## Default Routes diff --git a/website/docs/server/spring-server/spring-properties.md b/website/docs/server/spring-server/spring-properties.md index bdc0c74818..77a89f55c6 100644 --- a/website/docs/server/spring-server/spring-properties.md +++ b/website/docs/server/spring-server/spring-properties.md @@ -2,7 +2,7 @@ id: spring-properties title: Configuration Properties --- -`graphql-kotlin-spring-server` relies on [GraphQLConfigurationProperties](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/spring/GraphQLConfigurationProperties.kt) +`graphql-kotlin-spring-server` relies on [GraphQLConfigurationProperties](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLConfigurationProperties.kt) to provide various customizations of the auto-configuration library. All applicable configuration properties expose [configuration metadata](https://docs.spring.io/spring-boot/docs/current/reference/html/configuration-metadata.html) that provide details on the supported configuration properties. diff --git a/website/docs/server/spring-server/spring-schema.md b/website/docs/server/spring-server/spring-schema.md index b1c56f996b..6a3a4fd9f7 100644 --- a/website/docs/server/spring-server/spring-schema.md +++ b/website/docs/server/spring-server/spring-schema.md @@ -2,128 +2,86 @@ id: spring-schema title: Writing Schemas with Spring --- -In order to expose your queries, mutations and/or subscriptions in the GraphQL schema you simply need to create beans that -implement corresponding marker interface and they will be automatically picked up by `graphql-kotlin-spring-server` + +In order to expose your queries, mutations, and subscriptions in the GraphQL schema create beans that +implement the corresponding marker interface and they will be automatically picked up by `graphql-kotlin-spring-server` auto-configuration library. ```kotlin +data class Widget(val id: ID, val value: String) @Component -class MyAwesomeQuery : Query { - fun myAwesomeQuery(): Widget { ... } +class WidgetQuery : Query { + fun widget(id: ID): Widget = getWidgetFromDB(id) } @Component -class MyAwesomeMutation : Mutation { - fun myAwesomeMutation(widget: Widget): Widget { ... } +class WidgetMutation : Mutation { + fun updateWidget(id: ID, value: String): Boolean = updateWidgetInDB(id, value) } @Component -class MyAwesomeSubscription : Subscription { - fun myAwesomeSubscription(): Publisher { ... } +class WidgetSubscription : Subscription { + fun widgetChanges(id: ID): Publisher = getPublisherOfUpdates(id) } - -data class Widget(val id: Int, val value: String) - ``` will result in a Spring Boot reactive GraphQL web application with following schema. ```graphql - schema { query: Query mutation: Mutation subscription: Subscription } +type Widget { + id: ID! + value: String! +} + type Query { - myAwesomeQuery: Widget! + widget(id: ID!): Widget! } type Mutation { - myAwesomeMutation(widget: WidgetInput!): Widget! + updateWidget(id: ID!, value: String!): Boolean! } type Subscription { - myAwesomeSubscription: Widget! -} - -type Widget { - id: Int! - value: String! -} - -input WidgetInput { - id: Int! - value: String! + widgetChanges(id: ID!): Widget! } - ``` -## Spring Query Beans +## Spring Beans -Spring will automatically autowire dependent beans to our Spring query beans. Refer to [Spring Documentation](https://docs.spring.io/spring/docs/current/spring-framework-reference/) for details. +Since the top level objects are Spring components, Spring will automatically autowire dependent beans as normal. Refer to [Spring Documentation](https://docs.spring.io/spring/docs/current/spring-framework-reference/) for details. ```kotlin - @Component class WidgetQuery(private val repository: WidgetRepository) : Query { fun getWidget(id: Int): Widget = repository.findWidget(id) } - ``` -## Spring Data Fetcher +## Spring Beans in Arguments -`graphql-kotlin-spring-server` provides Spring aware data fetcher that automatically autowires Spring beans when they are +`graphql-kotlin-spring-server` provides Spring-aware data fetcher that automatically autowires Spring beans when they are specified as function arguments. `@Autowired` arguments should be explicitly excluded from the GraphQL schema by also specifying `@GraphQLIgnore`. ```kotlin - @Component class SpringQuery : Query { fun getWidget(@GraphQLIgnore @Autowired repository: WidgetRepository, id: Int): Widget = repository.findWidget(id) } - ``` -> NOTE: if you are using custom data fetcher make sure that you extend `SpringDataFetcher` instead of a base `FunctionDataFetcher`. - -## Spring BeanFactoryAware - -You can use Spring beans to wire different objects together at runtime. Instead of autowiring specific beans as properties, -you can also dynamically resolve beans by using bean factories. There is an example of how to set this up in the example -app in the [TopLevelBeanFactoryQuery.kt](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/examples/spring/src/main/kotlin/com/expediagroup/graphql/examples/query/TopLevelBeanFactoryQuery.kt). - -```kotlin - -@Component -class UsersQuery : Query, BeanFactoryAware { - private lateinit var beanFactory: BeanFactory - - @GraphQLIgnore - override fun setBeanFactory(beanFactory: BeanFactory) { - this.beanFactory = beanFactory - } +:::note - fun findUser(id: String): SubQuery = beanFactory.getBean(User::class.java, id) -} - -@Component -@Scope("prototype") -class User @Autowired(required = false) constructor(private val userId: String) { - - @Autowired - private lateinit var service: PhotoService - - fun photos(numberOfPhotos: Int): List = service.findPhotos(userId, numberOfPhotos) -} - -``` +If you are using custom data fetcher make sure that you extend `SpringDataFetcher` instead of the base `FunctionDataFetcher` to keep this functionallity. -* * * +::: We have examples of these techniques implemented in Spring boot in the [example app](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/examples/spring/src/main/kotlin/com/expediagroup/graphql/examples/query/NestedQueries.kt). diff --git a/website/sidebars.json b/website/sidebars.json index ba7862d0b6..a9bebac3f3 100644 --- a/website/sidebars.json +++ b/website/sidebars.json @@ -74,10 +74,11 @@ "label": "Spring Server", "items": [ "server/spring-server/spring-overview", - "server/spring-server/spring-beans", - "server/spring-server/spring-properties", "server/spring-server/spring-schema", "server/spring-server/spring-graphql-context", + "server/spring-server/spring-http-request-response", + "server/spring-server/spring-beans", + "server/spring-server/spring-properties", "server/spring-server/spring-subscriptions" ] } diff --git a/website/versioned_docs/version-3.x.x/contributors/release-proc.md b/website/versioned_docs/version-3.x.x/contributors/release-proc.md index 3a1eb04822..3f04cdecae 100644 --- a/website/versioned_docs/version-3.x.x/contributors/release-proc.md +++ b/website/versioned_docs/version-3.x.x/contributors/release-proc.md @@ -3,7 +3,7 @@ id: release-proc title: Releasing a new version original_id: release-proc --- -In order to [release a new version](https://github.com/ExpediaDotCom/graphql-kotlin/releases) we simply need to draft a new release +In order to [release a new version](https://github.com/ExpediaDotCom/graphql-kotlin/releases) we need to draft a new release and tag the commit. Releases are following [semantic versioning](https://semver.org/) and specify major, minor and patch version. Once release is published it will trigger corresponding [Github Action](https://github.com/ExpediaGroup/graphql-kotlin/blob/master/.github/workflows/release.yml) diff --git a/website/versioned_docs/version-3.x.x/federated/apollo-federation.md b/website/versioned_docs/version-3.x.x/federated/apollo-federation.md index 6aca1315d5..3424649b29 100644 --- a/website/versioned_docs/version-3.x.x/federated/apollo-federation.md +++ b/website/versioned_docs/version-3.x.x/federated/apollo-federation.md @@ -18,7 +18,7 @@ Gateway level. ## Install -Using a JVM dependency manager, simply link `graphql-kotlin-federation` to your project. +Using a JVM dependency manager, link `graphql-kotlin-federation` to your project. With Maven: diff --git a/website/versioned_docs/version-3.x.x/getting-started.md b/website/versioned_docs/version-3.x.x/getting-started.md index 533e55b340..b47c07bb67 100644 --- a/website/versioned_docs/version-3.x.x/getting-started.md +++ b/website/versioned_docs/version-3.x.x/getting-started.md @@ -33,7 +33,7 @@ Additional resources ## Installation -Using a JVM dependency manager, simply link any `graphql-kotlin-*` library to your project. You can see the latest +Using a JVM dependency manager, link any `graphql-kotlin-*` library to your project. You can see the latest version and other examples in [Sonatype Central Repository](https://search.maven.org/artifact/com.expediagroup/graphql-kotlin-spring-server) diff --git a/website/versioned_docs/version-3.x.x/schema-generator/execution/subscriptions.md b/website/versioned_docs/version-3.x.x/schema-generator/execution/subscriptions.md index a9708caf55..1ec1ed6882 100644 --- a/website/versioned_docs/version-3.x.x/schema-generator/execution/subscriptions.md +++ b/website/versioned_docs/version-3.x.x/schema-generator/execution/subscriptions.md @@ -4,35 +4,25 @@ title: Subscriptions original_id: subscriptions --- Subscriptions are supported with `graphql-java`. See their documentation first: -https: -To make a function a subscription function you just have to have the return type wrapped in an implementation of a -reactive-streams ``. As an example here is a function that uses Spring WebFlux to return a random number every -second. Since `` is an implementation of `` this is a valid method. +https://www.graphql-java.com/documentation/v16/subscriptions/ -```kotlin - - - -``` - -Then in the `` method you just have to provide a `` the same way as queries and mutations -are provided with the `` argument. +To make a function a subscription function update the return type to a type wrapped in an implementation of a +reactive-streams `Publisher`. As an example here is a function that uses Spring WebFlux to return a random number every +second. Since it is an implementation of `Publisher` this is a valid method. ```kotlin - - - +fun counter(): Flux = Flux.interval(Duration.ofSeconds(1)).map { Random.nextInt() } ``` ### Subscription Hooks -#### `` +#### `willResolveMonad` This hook is called after a new subscription type is generated but before it is added to the schema. The other generator hooks are still called so you can add logic for the types and validation of subscriptions the same as queries and mutations. -#### `` +#### `isValidSubscriptionReturnType` This hook is called when generating the functions for each subscription. It allows for changing the rules of what classes can be used as the return type. By default, graphql-java supports ``. @@ -41,5 +31,5 @@ To effectively use this hook, you should also override the `` hook, and if you a ### Server Implementation The server that runs your GraphQL schema will have to support some method for subscriptions, like WebSockets. -`` provides a default WebSocket based implementation. See more details in the +`graphql-kotlin-spring-server` provides a default WebSocket based implementation. See more details in the [server documentation](../../spring-server/subscriptions). diff --git a/website/versioned_docs/version-3.x.x/schema-generator/schema-generator-getting-started.md b/website/versioned_docs/version-3.x.x/schema-generator/schema-generator-getting-started.md index e28391b60a..3aa1bf11a9 100644 --- a/website/versioned_docs/version-3.x.x/schema-generator/schema-generator-getting-started.md +++ b/website/versioned_docs/version-3.x.x/schema-generator/schema-generator-getting-started.md @@ -5,7 +5,7 @@ original_id: schema-generator-getting-started --- ## Install -Using a JVM dependency manager, simply link `graphql-kotlin-schema-generator` to your project. +Using a JVM dependency manager, link `graphql-kotlin-schema-generator` to your project. With Maven: diff --git a/website/versioned_docs/version-3.x.x/spring-server/spring-overview.md b/website/versioned_docs/version-3.x.x/spring-server/spring-overview.md index b1cb7181bc..381f322c75 100644 --- a/website/versioned_docs/version-3.x.x/spring-server/spring-overview.md +++ b/website/versioned_docs/version-3.x.x/spring-server/spring-overview.md @@ -52,7 +52,7 @@ graphql: ``` ## Writing Schema Code -In order to expose your queries, mutations and/or subscriptions in the GraphQL schema you simply need to implement +In order to expose your queries, mutations and/or subscriptions in the GraphQL schema you need to implement corresponding marker interface and they will be automatically picked up by `graphql-kotlin-spring-server` auto-configuration library. diff --git a/website/versioned_docs/version-3.x.x/spring-server/spring-schema.md b/website/versioned_docs/version-3.x.x/spring-server/spring-schema.md index 87030085b0..9325097ae7 100644 --- a/website/versioned_docs/version-3.x.x/spring-server/spring-schema.md +++ b/website/versioned_docs/version-3.x.x/spring-server/spring-schema.md @@ -4,7 +4,7 @@ title: Writing Schemas with Spring original_id: spring-schema --- -In order to expose your queries, mutations and/or subscriptions in the GraphQL schema you simply need to create beans that +In order to expose your queries, mutations and/or subscriptions in the GraphQL schema you need to create beans that implement corresponding marker interface and they will be automatically picked up by `graphql-kotlin-spring-server` auto-configuration library.