Skip to content

Commit

Permalink
clean up code with unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddewie authored and federicorispo committed Jul 28, 2024
1 parent 9adc921 commit 79ee816
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 46 deletions.
Original file line number Diff line number Diff line change
@@ -1,21 +1,12 @@
package graphql.kickstart.execution.context;

import graphql.ExecutionInput;
import graphql.execution.ExecutionId;
import graphql.execution.instrumentation.ChainedInstrumentation;
import graphql.execution.instrumentation.Instrumentation;
import graphql.kickstart.execution.GraphQLRequest;
import graphql.kickstart.execution.input.GraphQLBatchedInvocationInput;
import graphql.kickstart.execution.input.PerQueryBatchedInvocationInput;
import graphql.kickstart.execution.input.PerRequestBatchedInvocationInput;
import graphql.kickstart.execution.instrumentation.FieldLevelTrackingApproach;
import graphql.kickstart.execution.instrumentation.RequestLevelTrackingApproach;
import graphql.schema.GraphQLSchema;
import java.util.Arrays;
import java.util.List;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import org.dataloader.DataLoaderRegistry;

/**
* An enum representing possible context settings. These are modeled after Apollo's link settings.
Expand Down Expand Up @@ -54,19 +45,4 @@ public GraphQLBatchedInvocationInput getBatch(
throw new ContextSettingNotConfiguredException();
}
}

/**
* Augments the provided instrumentation supplier to also supply the correct dispatching
* instrumentation.
*
* @param instrumentation the instrumentation supplier to augment
* @param executionInputs the inputs that will be dispatched by the instrumentation
// * @param options the DataLoader dispatching instrumentation options that will be used.
* @return augmented instrumentation supplier.
*/
public Supplier<Instrumentation> configureInstrumentationForContext(
Supplier<Instrumentation> instrumentation,
List<ExecutionInput> executionInputs) {
return instrumentation;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -189,26 +189,4 @@ class DataLoaderDispatchingSpec extends Specification {
return instrumentations
}
}

def "PER_QUERY does not add instrumentation"() {
when:
def chainedFromContext = ContextSetting.PER_QUERY
.configureInstrumentationForContext(chainedSupplier, Collections.emptyList())
def simpleFromContext = ContextSetting.PER_QUERY
.configureInstrumentationForContext(simpleSupplier, Collections.emptyList())
then:
simpleInstrumentation == simpleFromContext.get()
chainedInstrumentation == chainedFromContext.get()
}

def "PER_REQUEST_does not add instrumentation"() {
when:
def chainedFromContext = ContextSetting.PER_REQUEST
.configureInstrumentationForContext(chainedSupplier, Collections.emptyList())
def simpleFromContext = ContextSetting.PER_REQUEST
.configureInstrumentationForContext(simpleSupplier, Collections.emptyList())
then:
simpleInstrumentation == simpleFromContext.get()
chainedInstrumentation == chainedFromContext.get()
}
}

0 comments on commit 79ee816

Please sign in to comment.