Skip to content

Commit 79ee816

Browse files
hiddewiefedericorispo
authored andcommitted
clean up code with unused methods
1 parent 9adc921 commit 79ee816

File tree

2 files changed

+0
-46
lines changed

2 files changed

+0
-46
lines changed

graphql-java-kickstart/src/main/java/graphql/kickstart/execution/context/ContextSetting.java

-24
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
11
package graphql.kickstart.execution.context;
22

3-
import graphql.ExecutionInput;
4-
import graphql.execution.ExecutionId;
5-
import graphql.execution.instrumentation.ChainedInstrumentation;
6-
import graphql.execution.instrumentation.Instrumentation;
73
import graphql.kickstart.execution.GraphQLRequest;
84
import graphql.kickstart.execution.input.GraphQLBatchedInvocationInput;
95
import graphql.kickstart.execution.input.PerQueryBatchedInvocationInput;
106
import graphql.kickstart.execution.input.PerRequestBatchedInvocationInput;
11-
import graphql.kickstart.execution.instrumentation.FieldLevelTrackingApproach;
12-
import graphql.kickstart.execution.instrumentation.RequestLevelTrackingApproach;
137
import graphql.schema.GraphQLSchema;
14-
import java.util.Arrays;
158
import java.util.List;
169
import java.util.function.Supplier;
17-
import java.util.stream.Collectors;
18-
import org.dataloader.DataLoaderRegistry;
1910

2011
/**
2112
* An enum representing possible context settings. These are modeled after Apollo's link settings.
@@ -54,19 +45,4 @@ public GraphQLBatchedInvocationInput getBatch(
5445
throw new ContextSettingNotConfiguredException();
5546
}
5647
}
57-
58-
/**
59-
* Augments the provided instrumentation supplier to also supply the correct dispatching
60-
* instrumentation.
61-
*
62-
* @param instrumentation the instrumentation supplier to augment
63-
* @param executionInputs the inputs that will be dispatched by the instrumentation
64-
// * @param options the DataLoader dispatching instrumentation options that will be used.
65-
* @return augmented instrumentation supplier.
66-
*/
67-
public Supplier<Instrumentation> configureInstrumentationForContext(
68-
Supplier<Instrumentation> instrumentation,
69-
List<ExecutionInput> executionInputs) {
70-
return instrumentation;
71-
}
7248
}

graphql-java-servlet/src/test/groovy/graphql/kickstart/servlet/DataLoaderDispatchingSpec.groovy

-22
Original file line numberDiff line numberDiff line change
@@ -189,26 +189,4 @@ class DataLoaderDispatchingSpec extends Specification {
189189
return instrumentations
190190
}
191191
}
192-
193-
def "PER_QUERY does not add instrumentation"() {
194-
when:
195-
def chainedFromContext = ContextSetting.PER_QUERY
196-
.configureInstrumentationForContext(chainedSupplier, Collections.emptyList())
197-
def simpleFromContext = ContextSetting.PER_QUERY
198-
.configureInstrumentationForContext(simpleSupplier, Collections.emptyList())
199-
then:
200-
simpleInstrumentation == simpleFromContext.get()
201-
chainedInstrumentation == chainedFromContext.get()
202-
}
203-
204-
def "PER_REQUEST_does not add instrumentation"() {
205-
when:
206-
def chainedFromContext = ContextSetting.PER_REQUEST
207-
.configureInstrumentationForContext(chainedSupplier, Collections.emptyList())
208-
def simpleFromContext = ContextSetting.PER_REQUEST
209-
.configureInstrumentationForContext(simpleSupplier, Collections.emptyList())
210-
then:
211-
simpleInstrumentation == simpleFromContext.get()
212-
chainedInstrumentation == chainedFromContext.get()
213-
}
214192
}

0 commit comments

Comments
 (0)