All Downloads are FREE. Search and download functionalities are using the official Maven repository.

graphql.execution.ExecutionContext Maven / Gradle / Ivy

package graphql.execution;


import graphql.GraphQLError;
import graphql.language.FragmentDefinition;
import graphql.language.OperationDefinition;
import graphql.schema.GraphQLSchema;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

public class ExecutionContext {

    private GraphQLSchema graphQLSchema;
    private ExecutionStrategy executionStrategy;
    private Map fragmentsByName = new LinkedHashMap();
    private OperationDefinition operationDefinition;
    private Map variables = new LinkedHashMap();
    private Object root;
    private List errors = new ArrayList();

    public GraphQLSchema getGraphQLSchema() {
        return graphQLSchema;
    }

    public void setGraphQLSchema(GraphQLSchema graphQLSchema) {
        this.graphQLSchema = graphQLSchema;
    }

    public Map getFragmentsByName() {
        return fragmentsByName;
    }

    public void setFragmentsByName(Map fragmentsByName) {
        this.fragmentsByName = fragmentsByName;
    }

    public OperationDefinition getOperationDefinition() {
        return operationDefinition;
    }

    public void setOperationDefinition(OperationDefinition operationDefinition) {
        this.operationDefinition = operationDefinition;
    }

    public Map getVariables() {
        return variables;
    }

    public void setVariables(Map variables) {
        this.variables = variables;
    }

    public Object getRoot() {
        return root;
    }

    public void setRoot(Object root) {
        this.root = root;
    }

    public FragmentDefinition getFragment(String name) {
        return fragmentsByName.get(name);
    }

    public void addError(GraphQLError error) {
        this.errors.add(error);
    }

    public List getErrors() {
        return errors;
    }

    public ExecutionStrategy getExecutionStrategy() {
        return executionStrategy;
    }

    public void setExecutionStrategy(ExecutionStrategy executionStrategy) {
        this.executionStrategy = executionStrategy;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy