public class DataFetchingEnvironmentImpl extends java.lang.Object implements DataFetchingEnvironment
Constructor and Description |
---|
DataFetchingEnvironmentImpl(java.lang.Object source,
java.util.Map<java.lang.String,java.lang.Object> arguments,
java.lang.Object context,
java.util.List<Field> fields,
GraphQLOutputType fieldType,
GraphQLType parentType,
GraphQLSchema graphQLSchema,
java.util.Map<java.lang.String,FragmentDefinition> fragmentsByName,
ExecutionId executionId,
DataFetchingFieldSelectionSet selectionSet) |
Modifier and Type | Method and Description |
---|---|
boolean |
containsArgument(java.lang.String name)
Returns true of the named argument is present
|
<T> T |
getArgument(java.lang.String name)
Returns the named argument
|
java.util.Map<java.lang.String,java.lang.Object> |
getArguments() |
<T> T |
getContext()
Returns a context argument that is set up when the
GraphQL.execute(String, Object) method
is invoked |
ExecutionId |
getExecutionId() |
java.util.List<Field> |
getFields() |
GraphQLOutputType |
getFieldType() |
java.util.Map<java.lang.String,FragmentDefinition> |
getFragmentsByName() |
GraphQLSchema |
getGraphQLSchema() |
GraphQLType |
getParentType() |
DataFetchingFieldSelectionSet |
getSelectionSet() |
<T> T |
getSource() |
public DataFetchingEnvironmentImpl(java.lang.Object source, java.util.Map<java.lang.String,java.lang.Object> arguments, java.lang.Object context, java.util.List<Field> fields, GraphQLOutputType fieldType, GraphQLType parentType, GraphQLSchema graphQLSchema, java.util.Map<java.lang.String,FragmentDefinition> fragmentsByName, ExecutionId executionId, DataFetchingFieldSelectionSet selectionSet)
public <T> T getSource()
getSource
in interface DataFetchingEnvironment
T
- you decide what type it ispublic java.util.Map<java.lang.String,java.lang.Object> getArguments()
getArguments
in interface DataFetchingEnvironment
public boolean containsArgument(java.lang.String name)
DataFetchingEnvironment
containsArgument
in interface DataFetchingEnvironment
name
- the name of the argumentpublic <T> T getArgument(java.lang.String name)
DataFetchingEnvironment
getArgument
in interface DataFetchingEnvironment
T
- you decide what type it isname
- the name of the argumentpublic <T> T getContext()
DataFetchingEnvironment
GraphQL.execute(String, Object)
method
is invokedgetContext
in interface DataFetchingEnvironment
T
- you decide what type it ispublic java.util.List<Field> getFields()
getFields
in interface DataFetchingEnvironment
public GraphQLOutputType getFieldType()
getFieldType
in interface DataFetchingEnvironment
public GraphQLType getParentType()
getParentType
in interface DataFetchingEnvironment
public GraphQLSchema getGraphQLSchema()
getGraphQLSchema
in interface DataFetchingEnvironment
public java.util.Map<java.lang.String,FragmentDefinition> getFragmentsByName()
getFragmentsByName
in interface DataFetchingEnvironment
FragmentDefinition
map for the current operationpublic ExecutionId getExecutionId()
getExecutionId
in interface DataFetchingEnvironment
ExecutionId
for the current operationpublic DataFetchingFieldSelectionSet getSelectionSet()
getSelectionSet
in interface DataFetchingEnvironment
DataFetchingFieldSelectionSet
for the current operation