Skip to content

Commit 0af97b7

Browse files
committed
Removed deprecated methods in ExecutionInput
1 parent 4d817c2 commit 0af97b7

File tree

2 files changed

+1
-49
lines changed

2 files changed

+1
-49
lines changed

src/main/java/graphql/ExecutionInput.java

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -278,38 +278,7 @@ public Builder context(Object context) {
278278
return this;
279279
}
280280

281-
/**
282-
* The legacy context object
283-
*
284-
* @param contextBuilder the context builder object to use
285-
*
286-
* @return this builder
287-
*
288-
* @deprecated - the {@link ExecutionInput#getGraphQLContext()} is a fixed mutable instance now
289-
*/
290-
@Deprecated(since = "2021-07-05")
291-
public Builder context(GraphQLContext.Builder contextBuilder) {
292-
this.context = contextBuilder.build();
293-
return this;
294-
}
295-
296-
/**
297-
* The legacy context object
298-
*
299-
* @param contextBuilderFunction the context builder function to use
300-
*
301-
* @return this builder
302-
*
303-
* @deprecated - the {@link ExecutionInput#getGraphQLContext()} is a fixed mutable instance now
304-
*/
305-
@Deprecated(since = "2021-07-05")
306-
public Builder context(UnaryOperator<GraphQLContext.Builder> contextBuilderFunction) {
307-
GraphQLContext.Builder builder = GraphQLContext.newContext();
308-
builder = contextBuilderFunction.apply(builder);
309-
return context(builder.build());
310-
}
311-
312-
/**
281+
/**
313282
* This will give you a builder of {@link GraphQLContext} and any values you set will be copied
314283
* into the underlying {@link GraphQLContext} of this execution input
315284
*

src/test/groovy/graphql/ExecutionInputTest.groovy

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -45,23 +45,6 @@ class ExecutionInputTest extends Specification {
4545
executionInput.graphQLContext.get("a") == "b"
4646
}
4747

48-
def "legacy context methods work"() {
49-
// Retaining deprecated method tests for coverage
50-
when:
51-
def executionInput = ExecutionInput.newExecutionInput().query(query)
52-
.context({ builder -> builder.of("k1", "v1") } as UnaryOperator) // Retain deprecated for test coverage
53-
.build()
54-
then:
55-
(executionInput.context as GraphQLContext).get("k1") == "v1" // Retain deprecated for test coverage
56-
57-
when:
58-
executionInput = ExecutionInput.newExecutionInput().query(query)
59-
.context(GraphQLContext.newContext().of("k2", "v2")) // Retain deprecated for test coverage
60-
.build()
61-
then:
62-
(executionInput.context as GraphQLContext).get("k2") == "v2" // Retain deprecated for test coverage
63-
}
64-
6548
def "legacy context is defaulted"() {
6649
// Retaining deprecated method tests for coverage
6750
when:

0 commit comments

Comments
 (0)