diff --git a/src/main/java/graphql/ExecutionInput.java b/src/main/java/graphql/ExecutionInput.java index 7a4365717d..18456034ca 100644 --- a/src/main/java/graphql/ExecutionInput.java +++ b/src/main/java/graphql/ExecutionInput.java @@ -278,38 +278,7 @@ public Builder context(Object context) { return this; } - /** - * The legacy context object - * - * @param contextBuilder the context builder object to use - * - * @return this builder - * - * @deprecated - the {@link ExecutionInput#getGraphQLContext()} is a fixed mutable instance now - */ - @Deprecated(since = "2021-07-05") - public Builder context(GraphQLContext.Builder contextBuilder) { - this.context = contextBuilder.build(); - return this; - } - - /** - * The legacy context object - * - * @param contextBuilderFunction the context builder function to use - * - * @return this builder - * - * @deprecated - the {@link ExecutionInput#getGraphQLContext()} is a fixed mutable instance now - */ - @Deprecated(since = "2021-07-05") - public Builder context(UnaryOperator contextBuilderFunction) { - GraphQLContext.Builder builder = GraphQLContext.newContext(); - builder = contextBuilderFunction.apply(builder); - return context(builder.build()); - } - - /** + /** * This will give you a builder of {@link GraphQLContext} and any values you set will be copied * into the underlying {@link GraphQLContext} of this execution input * diff --git a/src/test/groovy/graphql/ExecutionInputTest.groovy b/src/test/groovy/graphql/ExecutionInputTest.groovy index f0b4b232fc..b3243e0d26 100644 --- a/src/test/groovy/graphql/ExecutionInputTest.groovy +++ b/src/test/groovy/graphql/ExecutionInputTest.groovy @@ -45,23 +45,6 @@ class ExecutionInputTest extends Specification { executionInput.graphQLContext.get("a") == "b" } - def "legacy context methods work"() { - // Retaining deprecated method tests for coverage - when: - def executionInput = ExecutionInput.newExecutionInput().query(query) - .context({ builder -> builder.of("k1", "v1") } as UnaryOperator) // Retain deprecated for test coverage - .build() - then: - (executionInput.context as GraphQLContext).get("k1") == "v1" // Retain deprecated for test coverage - - when: - executionInput = ExecutionInput.newExecutionInput().query(query) - .context(GraphQLContext.newContext().of("k2", "v2")) // Retain deprecated for test coverage - .build() - then: - (executionInput.context as GraphQLContext).get("k2") == "v2" // Retain deprecated for test coverage - } - def "legacy context is defaulted"() { // Retaining deprecated method tests for coverage when: