Skip to content

Commit bce5bc4

Browse files
graphql java 22 update (#1967)
### 📝 Description waiting for an official release of this PR graphql-java/graphql-java#3571 UPDATE: next graphql-java update will be on July, https://github.com/graphql-java/graphql-java/milestone/69 they helped us releasing from this branch graphql-java/graphql-java#3571 which will unblock us. https://github.com/graphql-java/graphql-java/releases/tag/v22.0
1 parent bf98546 commit bce5bc4

File tree

40 files changed

+102
-1175
lines changed

40 files changed

+102
-1175
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2021 Expedia, Inc
2+
* Copyright 2024 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.
@@ -22,6 +22,7 @@ import graphql.execution.instrumentation.InstrumentationContext
2222
import graphql.execution.instrumentation.InstrumentationState
2323
import graphql.execution.instrumentation.SimpleInstrumentationContext
2424
import graphql.execution.instrumentation.SimplePerformantInstrumentation
25+
import graphql.execution.instrumentation.parameters.InstrumentationCreateStateParameters
2526
import graphql.execution.instrumentation.parameters.InstrumentationExecutionParameters
2627
import graphql.execution.instrumentation.parameters.InstrumentationFieldFetchParameters
2728
import org.slf4j.LoggerFactory
@@ -37,7 +38,7 @@ class TrackTimesInvokedInstrumentation : SimplePerformantInstrumentation() {
3738

3839
private val logger = LoggerFactory.getLogger(TrackTimesInvokedInstrumentation::class.java)
3940

40-
override fun createState(): InstrumentationState = TrackTimesInvokedInstrumenationState()
41+
override fun createState(parameters: InstrumentationCreateStateParameters): InstrumentationState = TrackTimesInvokedInstrumenationState()
4142

4243
override fun beginFieldFetch(parameters: InstrumentationFieldFetchParameters, state: InstrumentationState?): InstrumentationContext<Any> {
4344
if (parameters.field.getDirective(TRACK_TIMES_INVOKED_DIRECTIVE_NAME) != null) {

executions/graphql-kotlin-automatic-persisted-queries/src/main/kotlin/com/expediagroup/graphql/apq/cache/AutomaticPersistedQueriesCache.kt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,6 @@ import graphql.execution.preparsed.persisted.PersistedQueryCacheMiss
2323
import java.util.concurrent.CompletableFuture
2424

2525
interface AutomaticPersistedQueriesCache : PersistedQueryCache {
26-
27-
@Deprecated(
28-
message = "deprecated in favor of async retrieval of PreparsedDocumentEntry",
29-
replaceWith = ReplaceWith("getPersistedQueryDocumentAsync(persistedQueryId, executionInput, onCacheMiss)")
30-
)
31-
override fun getPersistedQueryDocument(
32-
persistedQueryId: Any,
33-
executionInput: ExecutionInput,
34-
onCacheMiss: PersistedQueryCacheMiss
35-
): PreparsedDocumentEntry =
36-
getPersistedQueryDocumentAsync(persistedQueryId, executionInput, onCacheMiss).get()
37-
3826
override fun getPersistedQueryDocumentAsync(
3927
persistedQueryId: Any,
4028
executionInput: ExecutionInput,

executions/graphql-kotlin-automatic-persisted-queries/src/main/kotlin/com/expediagroup/graphql/apq/provider/AutomaticPersistedQueriesProvider.kt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,20 +33,6 @@ import java.util.function.Function
3333
class AutomaticPersistedQueriesProvider(
3434
private val cache: AutomaticPersistedQueriesCache
3535
) : PreparsedDocumentProvider {
36-
37-
@Deprecated(
38-
"deprecated in favor of async retrieval of Document",
39-
ReplaceWith("this.getDocumentAsync(executionInput, parseAndValidateFunction).get()")
40-
)
41-
override fun getDocument(
42-
executionInput: ExecutionInput,
43-
parseAndValidateFunction: Function<ExecutionInput, PreparsedDocumentEntry>
44-
): PreparsedDocumentEntry =
45-
this.getDocumentAsync(
46-
executionInput,
47-
parseAndValidateFunction
48-
).get()
49-
5036
override fun getDocumentAsync(
5137
executionInput: ExecutionInput,
5238
parseAndValidateFunction: Function<ExecutionInput, PreparsedDocumentEntry>

executions/graphql-kotlin-dataloader-instrumentation/src/main/kotlin/com/expediagroup/graphql/dataloader/instrumentation/extensions/CompletableFutureExtensions.kt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022 Expedia, Inc
2+
* Copyright 2024 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.
@@ -19,8 +19,6 @@ package com.expediagroup.graphql.dataloader.instrumentation.extensions
1919
import com.expediagroup.graphql.dataloader.KotlinDataLoaderRegistry
2020
import com.expediagroup.graphql.dataloader.instrumentation.exceptions.MissingInstrumentationStateException
2121
import com.expediagroup.graphql.dataloader.instrumentation.exceptions.MissingKotlinDataLoaderRegistryException
22-
import com.expediagroup.graphql.dataloader.instrumentation.level.state.ExecutionLevelDispatchedState
23-
import com.expediagroup.graphql.dataloader.instrumentation.level.state.Level
2422
import com.expediagroup.graphql.dataloader.instrumentation.syncexhaustion.state.SyncExecutionExhaustedState
2523
import graphql.schema.DataFetchingEnvironment
2624
import org.dataloader.DataLoader
@@ -38,11 +36,6 @@ fun <V> CompletableFuture<V>.dispatchIfNeeded(
3836

3937
if (dataLoaderRegistry.dataLoadersInvokedOnDispatch()) {
4038
val cantContinueExecution = when {
41-
environment.graphQlContext.hasKey(ExecutionLevelDispatchedState::class) -> {
42-
environment
43-
.graphQlContext.get<ExecutionLevelDispatchedState>(ExecutionLevelDispatchedState::class)
44-
.allExecutionsDispatched(Level(environment.executionStepInfo.path.level))
45-
}
4639
environment.graphQlContext.hasKey(SyncExecutionExhaustedState::class) -> {
4740
environment
4841
.graphQlContext.get<SyncExecutionExhaustedState>(SyncExecutionExhaustedState::class)

executions/graphql-kotlin-dataloader-instrumentation/src/main/kotlin/com/expediagroup/graphql/dataloader/instrumentation/level/DataLoaderLevelDispatchedInstrumentation.kt

Lines changed: 0 additions & 45 deletions
This file was deleted.

executions/graphql-kotlin-dataloader-instrumentation/src/main/kotlin/com/expediagroup/graphql/dataloader/instrumentation/level/execution/AbstractExecutionLevelDispatchedInstrumentation.kt

Lines changed: 0 additions & 105 deletions
This file was deleted.

executions/graphql-kotlin-dataloader-instrumentation/src/main/kotlin/com/expediagroup/graphql/dataloader/instrumentation/level/execution/ExecutionLevelDispatchedInstrumentationParameters.kt

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)