Skip to content

Commit 40e36b5

Browse files
committed
Removing the deprecated CacheControl support
This has been deprecated since 2022-07-26
1 parent 8649ea6 commit 40e36b5

File tree

9 files changed

+0
-489
lines changed

9 files changed

+0
-489
lines changed

src/main/java/graphql/ExecutionInput.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package graphql;
22

3-
import graphql.cachecontrol.CacheControl;
43
import graphql.collect.ImmutableKit;
54
import graphql.execution.ExecutionId;
65
import graphql.execution.RawVariables;
@@ -28,7 +27,6 @@ public class ExecutionInput {
2827
private final RawVariables rawVariables;
2928
private final Map<String, Object> extensions;
3029
private final DataLoaderRegistry dataLoaderRegistry;
31-
private final CacheControl cacheControl;
3230
private final ExecutionId executionId;
3331
private final Locale locale;
3432

@@ -42,7 +40,6 @@ private ExecutionInput(Builder builder) {
4240
this.root = builder.root;
4341
this.rawVariables = builder.rawVariables;
4442
this.dataLoaderRegistry = builder.dataLoaderRegistry;
45-
this.cacheControl = builder.cacheControl;
4643
this.executionId = builder.executionId;
4744
this.locale = builder.locale != null ? builder.locale : Locale.getDefault(); // always have a locale in place
4845
this.localContext = builder.localContext;
@@ -119,16 +116,6 @@ public DataLoaderRegistry getDataLoaderRegistry() {
119116
return dataLoaderRegistry;
120117
}
121118

122-
/**
123-
* @return the cache control helper associated with this execution
124-
*
125-
* @deprecated - Apollo has deprecated the Cache Control specification
126-
*/
127-
@Deprecated
128-
@DeprecatedAt("2022-07-26")
129-
public CacheControl getCacheControl() {
130-
return cacheControl;
131-
}
132119

133120
/**
134121
* @return Id that will be/was used to execute this operation.
@@ -170,7 +157,6 @@ public ExecutionInput transform(Consumer<Builder> builderConsumer) {
170157
.localContext(this.localContext)
171158
.root(this.root)
172159
.dataLoaderRegistry(this.dataLoaderRegistry)
173-
.cacheControl(this.cacheControl)
174160
.variables(this.rawVariables.toMap())
175161
.extensions(this.extensions)
176162
.executionId(this.executionId)
@@ -229,8 +215,6 @@ public static class Builder {
229215
// dataloader field tracking away.
230216
//
231217
private DataLoaderRegistry dataLoaderRegistry = DataLoaderDispatcherInstrumentationState.EMPTY_DATALOADER_REGISTRY;
232-
@DeprecatedAt("2022-07-26")
233-
private CacheControl cacheControl = CacheControl.newCacheControl();
234218
private Locale locale = Locale.getDefault();
235219
private ExecutionId executionId;
236220

@@ -399,13 +383,6 @@ public Builder dataLoaderRegistry(DataLoaderRegistry dataLoaderRegistry) {
399383
return this;
400384
}
401385

402-
@Deprecated
403-
@DeprecatedAt("2022-07-26")
404-
public Builder cacheControl(CacheControl cacheControl) {
405-
this.cacheControl = assertNotNull(cacheControl);
406-
return this;
407-
}
408-
409386
public ExecutionInput build() {
410387
return new ExecutionInput(this);
411388
}

src/main/java/graphql/cachecontrol/CacheControl.java

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

src/main/java/graphql/execution/Execution.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ public CompletableFuture<ExecutionResult> execute(Document document, GraphQLSche
9090
.document(document)
9191
.operationDefinition(operationDefinition)
9292
.dataLoaderRegistry(executionInput.getDataLoaderRegistry())
93-
.cacheControl(executionInput.getCacheControl())
9493
.locale(executionInput.getLocale())
9594
.valueUnboxer(valueUnboxer)
9695
.executionInput(executionInput)

src/main/java/graphql/execution/ExecutionContext.java

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import graphql.GraphQLContext;
99
import graphql.GraphQLError;
1010
import graphql.PublicApi;
11-
import graphql.cachecontrol.CacheControl;
1211
import graphql.collect.ImmutableKit;
1312
import graphql.execution.instrumentation.Instrumentation;
1413
import graphql.execution.instrumentation.InstrumentationState;
@@ -52,7 +51,6 @@ public class ExecutionContext {
5251
private final AtomicReference<ImmutableList<GraphQLError>> errors = new AtomicReference<>(ImmutableKit.emptyList());
5352
private final Set<ResultPath> errorPaths = new HashSet<>();
5453
private final DataLoaderRegistry dataLoaderRegistry;
55-
private final CacheControl cacheControl;
5654
private final Locale locale;
5755
private final ValueUnboxer valueUnboxer;
5856
private final ExecutionInput executionInput;
@@ -74,7 +72,6 @@ public class ExecutionContext {
7472
this.root = builder.root;
7573
this.instrumentation = builder.instrumentation;
7674
this.dataLoaderRegistry = builder.dataLoaderRegistry;
77-
this.cacheControl = builder.cacheControl;
7875
this.locale = builder.locale;
7976
this.valueUnboxer = builder.valueUnboxer;
8077
this.errors.set(builder.errors);
@@ -166,12 +163,6 @@ public DataLoaderRegistry getDataLoaderRegistry() {
166163
return dataLoaderRegistry;
167164
}
168165

169-
@Deprecated
170-
@DeprecatedAt("2022-07-26")
171-
public CacheControl getCacheControl() {
172-
return cacheControl;
173-
}
174-
175166
public Locale getLocale() {
176167
return locale;
177168
}

src/main/java/graphql/execution/ExecutionContextBuilder.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
import graphql.GraphQLError;
99
import graphql.Internal;
1010
import graphql.PublicApi;
11-
import graphql.cachecontrol.CacheControl;
1211
import graphql.collect.ImmutableKit;
1312
import graphql.execution.instrumentation.Instrumentation;
1413
import graphql.execution.instrumentation.InstrumentationState;
@@ -42,7 +41,6 @@ public class ExecutionContextBuilder {
4241
CoercedVariables coercedVariables = CoercedVariables.emptyVariables();
4342
ImmutableMap<String, FragmentDefinition> fragmentsByName = ImmutableKit.emptyMap();
4443
DataLoaderRegistry dataLoaderRegistry;
45-
CacheControl cacheControl;
4644
Locale locale;
4745
ImmutableList<GraphQLError> errors = emptyList();
4846
ValueUnboxer valueUnboxer;
@@ -89,7 +87,6 @@ public ExecutionContextBuilder() {
8987
coercedVariables = other.getCoercedVariables();
9088
fragmentsByName = ImmutableMap.copyOf(other.getFragmentsByName());
9189
dataLoaderRegistry = other.getDataLoaderRegistry();
92-
cacheControl = other.getCacheControl();
9390
locale = other.getLocale();
9491
errors = ImmutableList.copyOf(other.getErrors());
9592
valueUnboxer = other.getValueUnboxer();
@@ -194,13 +191,6 @@ public ExecutionContextBuilder dataLoaderRegistry(DataLoaderRegistry dataLoaderR
194191
return this;
195192
}
196193

197-
@Deprecated
198-
@DeprecatedAt("2022-07-26")
199-
public ExecutionContextBuilder cacheControl(CacheControl cacheControl) {
200-
this.cacheControl = cacheControl;
201-
return this;
202-
}
203-
204194
public ExecutionContextBuilder locale(Locale locale) {
205195
this.locale = locale;
206196
return this;

0 commit comments

Comments
 (0)