Skip to content

Commit 1583066

Browse files
smyrickShane Myrick
andauthored
Move spring-server to com.expediagroup.graphql.server.spring (#999)
* Move spring-server to com.expediagroup.graphql.server.spring * Ktlint * Update SimpleMutations.kt * Update SimpleQueries.kt Co-authored-by: Shane Myrick <[email protected]>
1 parent 9550519 commit 1583066

File tree

50 files changed

+146
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+146
-151
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,17 @@ Visit our [documentation site](https://expediagroup.github.io/graphql-kotlin) fo
1515
* [examples](/examples) - Example apps that use graphql-kotlin libraries to test and demonstrate usages
1616
* [graphql-kotlin-federation](/graphql-kotlin-federation) - Schema generator extension to build Apollo Federation GraphQL schemas
1717
* [graphql-kotlin-schema-generator](/graphql-kotlin-schema-generator) - Code only GraphQL schema generation for Kotlin
18-
* [graphql-kotlin-spring-server](/graphql-kotlin-spring-server) - Spring Boot auto-configuration library to create a GraphQL server
1918
* [graphql-kotlin-types](/graphql-kotlin-types) - Core types used by both client and server
2019
* [plugins](/plugins) - Gradle and Maven plugins
20+
* [servers](/servers) - Common and library specific modules for running a GraphQL server
2121

2222
## ⌨️ Usage
2323

2424
While all the individual modules of `graphql-kotlin` are published as stand-alone libraries, the most common use cases are running a server, and genereating a type-safe client.
2525

2626
### Server Example
2727

28-
A basic example of how you can use [graphql-kotlin-spring-server](/graphql-kotlin-spring-server) to run a GraphQL server can be found on our [server documentation section](https://expediagroup.github.io/graphql-kotlin/docs/spring-server/spring-overview).
28+
A basic example of how you can use [graphql-kotlin-spring-server](/servers/graphql-kotlin-spring-server) to run a GraphQL server can be found on our [server documentation section](https://expediagroup.github.io/graphql-kotlin/docs/spring-server/spring-overview).
2929

3030
### Client Example
3131

examples/server/spring-server/src/main/kotlin/com/expediagroup/graphql/examples/Application.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import com.expediagroup.graphql.examples.execution.CustomDataFetcherFactoryProvi
2323
import com.expediagroup.graphql.examples.execution.MySubscriptionHooks
2424
import com.expediagroup.graphql.examples.execution.SpringDataFetcherFactory
2525
import com.expediagroup.graphql.examples.hooks.CustomSchemaGeneratorHooks
26-
import com.expediagroup.graphql.spring.execution.ApolloSubscriptionHooks
26+
import com.expediagroup.graphql.server.spring.subscriptions.ApolloSubscriptionHooks
2727
import com.fasterxml.jackson.databind.ObjectMapper
2828
import graphql.execution.DataFetcherExceptionHandler
2929
import org.springframework.boot.autoconfigure.SpringBootApplication

examples/server/spring-server/src/main/kotlin/com/expediagroup/graphql/examples/context/MyGraphQLContextFactory.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.expediagroup.graphql.examples.context
22

33
import com.expediagroup.graphql.server.execution.GraphQLContextFactory
4-
import com.expediagroup.graphql.spring.execution.SpringGraphQLContextFactory
5-
import com.expediagroup.graphql.spring.execution.SpringSubscriptionGraphQLContextFactory
4+
import com.expediagroup.graphql.server.spring.execution.SpringGraphQLContextFactory
5+
import com.expediagroup.graphql.server.spring.subscriptions.SpringSubscriptionGraphQLContextFactory
66
import org.springframework.stereotype.Component
77
import org.springframework.web.reactive.function.server.ServerRequest
88
import org.springframework.web.reactive.socket.WebSocketSession

examples/server/spring-server/src/main/kotlin/com/expediagroup/graphql/examples/execution/CustomFunctionDataFetcher.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
package com.expediagroup.graphql.examples.execution
1818

19-
import com.expediagroup.graphql.spring.execution.SpringDataFetcher
19+
import com.expediagroup.graphql.server.spring.execution.SpringDataFetcher
2020
import com.fasterxml.jackson.databind.ObjectMapper
2121
import graphql.schema.DataFetchingEnvironment
2222
import org.springframework.context.ApplicationContext

examples/server/spring-server/src/main/kotlin/com/expediagroup/graphql/examples/execution/MySubscriptionHooks.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package com.expediagroup.graphql.examples.execution
22

33
import com.expediagroup.graphql.examples.context.MySubscriptionGraphQLContext
44
import com.expediagroup.graphql.execution.GraphQLContext
5-
import com.expediagroup.graphql.spring.execution.ApolloSubscriptionHooks
5+
import com.expediagroup.graphql.server.spring.subscriptions.ApolloSubscriptionHooks
66
import kotlinx.coroutines.reactor.mono
77
import org.springframework.web.reactive.socket.WebSocketSession
88
import reactor.core.publisher.Mono

examples/server/spring-server/src/test/kotlin/com/expediagroup/graphql/examples/subscriptions/SimpleSubscriptionIT.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
package com.expediagroup.graphql.examples.subscriptions
1818

1919
import com.expediagroup.graphql.examples.SUBSCRIPTION_ENDPOINT
20-
import com.expediagroup.graphql.spring.model.SubscriptionOperationMessage
21-
import com.expediagroup.graphql.spring.model.SubscriptionOperationMessage.ClientMessages.GQL_CONNECTION_INIT
22-
import com.expediagroup.graphql.spring.model.SubscriptionOperationMessage.ClientMessages.GQL_START
23-
import com.expediagroup.graphql.spring.model.SubscriptionOperationMessage.ServerMessages
20+
import com.expediagroup.graphql.server.spring.subscriptions.SubscriptionOperationMessage
21+
import com.expediagroup.graphql.server.spring.subscriptions.SubscriptionOperationMessage.ClientMessages.GQL_CONNECTION_INIT
22+
import com.expediagroup.graphql.server.spring.subscriptions.SubscriptionOperationMessage.ClientMessages.GQL_START
23+
import com.expediagroup.graphql.server.spring.subscriptions.SubscriptionOperationMessage.ServerMessages
2424
import com.expediagroup.graphql.types.GraphQLRequest
2525
import com.fasterxml.jackson.module.kotlin.jacksonObjectMapper
2626
import com.fasterxml.jackson.module.kotlin.readValue

servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/spring/FederatedSchemaAutoConfiguration.kt renamed to servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/FederatedSchemaAutoConfiguration.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 Expedia, Inc
2+
* Copyright 2021 Expedia, Inc
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.expediagroup.graphql.spring
17+
package com.expediagroup.graphql.server.spring
1818

1919
import com.expediagroup.graphql.TopLevelNames
2020
import com.expediagroup.graphql.execution.KotlinDataFetcherFactoryProvider
@@ -26,7 +26,7 @@ import com.expediagroup.graphql.federation.toFederatedSchema
2626
import com.expediagroup.graphql.server.operations.Mutation
2727
import com.expediagroup.graphql.server.operations.Query
2828
import com.expediagroup.graphql.server.operations.Subscription
29-
import com.expediagroup.graphql.spring.extensions.toTopLevelObjects
29+
import com.expediagroup.graphql.server.spring.extensions.toTopLevelObjects
3030
import graphql.schema.GraphQLSchema
3131
import org.slf4j.LoggerFactory
3232
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean

servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/spring/GraphQLAutoConfiguration.kt renamed to servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLAutoConfiguration.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Expedia, Inc
2+
* Copyright 2021 Expedia, Inc
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.expediagroup.graphql.spring
17+
package com.expediagroup.graphql.server.spring
1818

1919
import org.springframework.context.annotation.Configuration
2020
import org.springframework.context.annotation.Import

servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/spring/GraphQLConfigurationProperties.kt renamed to servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLConfigurationProperties.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2019 Expedia, Inc
2+
* Copyright 2021 Expedia, Inc
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.expediagroup.graphql.spring
17+
package com.expediagroup.graphql.server.spring
1818

1919
import org.springframework.boot.context.properties.ConfigurationProperties
2020
import org.springframework.boot.context.properties.ConstructorBinding

servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/spring/GraphQLExecutionConfiguration.kt renamed to servers/graphql-kotlin-spring-server/src/main/kotlin/com/expediagroup/graphql/server/spring/GraphQLExecutionConfiguration.kt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2020 Expedia, Inc
2+
* Copyright 2021 Expedia, Inc
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -14,13 +14,13 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.expediagroup.graphql.spring
17+
package com.expediagroup.graphql.server.spring
1818

1919
import com.expediagroup.graphql.execution.KotlinDataFetcherFactoryProvider
2020
import com.expediagroup.graphql.server.execution.DataLoaderRegistryFactory
21-
import com.expediagroup.graphql.spring.exception.KotlinDataFetcherExceptionHandler
22-
import com.expediagroup.graphql.spring.execution.EmptyDataLoaderRegistryFactory
23-
import com.expediagroup.graphql.spring.execution.SpringKotlinDataFetcherFactoryProvider
21+
import com.expediagroup.graphql.server.spring.exception.KotlinDataFetcherExceptionHandler
22+
import com.expediagroup.graphql.server.spring.execution.EmptyDataLoaderRegistryFactory
23+
import com.expediagroup.graphql.server.spring.execution.SpringKotlinDataFetcherFactoryProvider
2424
import com.fasterxml.jackson.databind.ObjectMapper
2525
import graphql.execution.DataFetcherExceptionHandler
2626
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean

0 commit comments

Comments
 (0)