graphql.schema.DataFetchingEnvironment Maven / Gradle / Ivy
package graphql.schema;
import graphql.language.Field;
import java.util.List;
import java.util.Map;
public class DataFetchingEnvironment {
private final Object source;
private final Map arguments;
private final Object context;
private final List fields;
private final GraphQLOutputType fieldType;
private final GraphQLType parentType;
private final GraphQLSchema graphQLSchema;
public DataFetchingEnvironment(Object source, Map arguments, Object context, List fields, GraphQLOutputType fieldType, GraphQLType parentType, GraphQLSchema graphQLSchema) {
this.source = source;
this.arguments = arguments;
this.context = context;
this.fields = fields;
this.fieldType = fieldType;
this.parentType = parentType;
this.graphQLSchema = graphQLSchema;
}
public Object getSource() {
return source;
}
public Map getArguments() {
return arguments;
}
public boolean containsArgument(String name) {
return arguments.containsKey(name);
}
public T getArgument(String name) {
return (T) arguments.get(name);
}
public Object getContext() {
return context;
}
public List getFields() {
return fields;
}
public GraphQLOutputType getFieldType() {
return fieldType;
}
public GraphQLType getParentType() {
return parentType;
}
public GraphQLSchema getGraphQLSchema() {
return graphQLSchema;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy