@Internal ExecutionContextBuilder(ExecutionContext other) { instrumentation = other.getInstrumentation(); executionId = other.getExecutionId(); instrumentationState = other.getInstrumentationState(); graphQLSchema = other.getGraphQLSchema(); queryStrategy = other.getQueryStrategy(); mutationStrategy = other.getMutationStrategy(); subscriptionStrategy = other.getSubscriptionStrategy(); context = other.getContext(); root = other.getRoot(); document = other.getDocument(); operationDefinition = other.getOperationDefinition(); variables = new HashMap<>(other.getVariables()); fragmentsByName = new HashMap<>(other.getFragmentsByName()); dataLoaderRegistry = other.getDataLoaderRegistry(); errors = new ArrayList<>(other.getErrors()); }
public GraphQLObjectType resolveType(ExecutionContext executionContext, MergedField field, Object source, Map<String, Object> arguments, GraphQLType fieldType) { GraphQLObjectType resolvedType; if (fieldType instanceof GraphQLInterfaceType) { TypeResolutionParameters resolutionParams = TypeResolutionParameters.newParameters() .graphQLInterfaceType((GraphQLInterfaceType) fieldType) .field(field) .value(source) .argumentValues(arguments) .context(executionContext.getContext()) .schema(executionContext.getGraphQLSchema()).build(); resolvedType = resolveTypeForInterface(resolutionParams); } else if (fieldType instanceof GraphQLUnionType) { TypeResolutionParameters resolutionParams = TypeResolutionParameters.newParameters() .graphQLUnionType((GraphQLUnionType) fieldType) .field(field) .value(source) .argumentValues(arguments) .context(executionContext.getContext()) .schema(executionContext.getGraphQLSchema()).build(); resolvedType = resolveTypeForUnion(resolutionParams); } else { resolvedType = (GraphQLObjectType) fieldType; } return resolvedType; }
.executionStepInfo(executionStepInfo) .source(root) .localContext(executionContext.getContext()) .fields(fields) .nonNullFieldValidator(nonNullableFieldValidator)
public static Builder newDataFetchingEnvironment(ExecutionContext executionContext) { return new Builder() .context(executionContext.getContext()) .root(executionContext.getRoot()) .graphQLSchema(executionContext.getGraphQLSchema()) .fragmentsByName(executionContext.getFragmentsByName()) .dataLoaderRegistry(executionContext.getDataLoaderRegistry()) .document(executionContext.getDocument()) .operationDefinition(executionContext.getOperationDefinition()) .variables(executionContext.getVariables()) .executionId(executionContext.getExecutionId()); }
@Internal ExecutionContextBuilder(ExecutionContext other) { instrumentation = other.getInstrumentation(); executionId = other.getExecutionId(); instrumentationState = other.getInstrumentationState(); graphQLSchema = other.getGraphQLSchema(); queryStrategy = other.getQueryStrategy(); mutationStrategy = other.getMutationStrategy(); subscriptionStrategy = other.getSubscriptionStrategy(); context = other.getContext(); root = other.getRoot(); document = other.getDocument(); operationDefinition = other.getOperationDefinition(); variables = new HashMap<>(other.getVariables()); fragmentsByName = new HashMap<>(other.getFragmentsByName()); dataLoaderRegistry = other.getDataLoaderRegistry(); errors = new ArrayList<>(other.getErrors()); }
public GraphQLObjectType resolveType(ExecutionContext executionContext, MergedField field, Object source, Map<String, Object> arguments, GraphQLType fieldType) { GraphQLObjectType resolvedType; if (fieldType instanceof GraphQLInterfaceType) { TypeResolutionParameters resolutionParams = TypeResolutionParameters.newParameters() .graphQLInterfaceType((GraphQLInterfaceType) fieldType) .field(field) .value(source) .argumentValues(arguments) .context(executionContext.getContext()) .schema(executionContext.getGraphQLSchema()).build(); resolvedType = resolveTypeForInterface(resolutionParams); } else if (fieldType instanceof GraphQLUnionType) { TypeResolutionParameters resolutionParams = TypeResolutionParameters.newParameters() .graphQLUnionType((GraphQLUnionType) fieldType) .field(field) .value(source) .argumentValues(arguments) .context(executionContext.getContext()) .schema(executionContext.getGraphQLSchema()).build(); resolvedType = resolveTypeForUnion(resolutionParams); } else { resolvedType = (GraphQLObjectType) fieldType; } return resolvedType; }
public static Builder newDataFetchingEnvironment(ExecutionContext executionContext) { return new Builder() .context(executionContext.getContext()) .root(executionContext.getRoot()) .graphQLSchema(executionContext.getGraphQLSchema()) .fragmentsByName(executionContext.getFragmentsByName()) .dataLoaderRegistry(executionContext.getDataLoaderRegistry()) .document(executionContext.getDocument()) .operationDefinition(executionContext.getOperationDefinition()) .variables(executionContext.getVariables()) .executionId(executionContext.getExecutionId()); }
.executionStepInfo(executionStepInfo) .source(root) .localContext(executionContext.getContext()) .fields(fields) .nonNullFieldValidator(nonNullableFieldValidator)