Package graphql.analysis
Class QueryVisitorFieldEnvironmentImpl
- java.lang.Object
-
- graphql.analysis.QueryVisitorFieldEnvironmentImpl
-
- All Implemented Interfaces:
QueryVisitorFieldEnvironment
public class QueryVisitorFieldEnvironmentImpl extends java.lang.Object implements QueryVisitorFieldEnvironment
-
-
Constructor Summary
Constructors Constructor Description QueryVisitorFieldEnvironmentImpl(boolean typeNameIntrospectionField, Field field, GraphQLFieldDefinition fieldDefinition, GraphQLOutputType parentType, GraphQLFieldsContainer unmodifiedParentType, QueryVisitorFieldEnvironment parentEnvironment, java.util.Map<java.lang.String,java.lang.Object> arguments, SelectionSetContainer selectionSetContainer, TraverserContext<Node> traverserContext, GraphQLSchema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.Map<java.lang.String,java.lang.Object>
getArguments()
Field
getField()
GraphQLFieldDefinition
getFieldDefinition()
GraphQLFieldsContainer
getFieldsContainer()
QueryVisitorFieldEnvironment
getParentEnvironment()
GraphQLOutputType
getParentType()
GraphQLSchema
getSchema()
SelectionSetContainer
getSelectionSetContainer()
TraverserContext<Node>
getTraverserContext()
int
hashCode()
boolean
isTypeNameIntrospectionField()
java.lang.String
toString()
-
-
-
Constructor Detail
-
QueryVisitorFieldEnvironmentImpl
public QueryVisitorFieldEnvironmentImpl(boolean typeNameIntrospectionField, Field field, GraphQLFieldDefinition fieldDefinition, GraphQLOutputType parentType, GraphQLFieldsContainer unmodifiedParentType, QueryVisitorFieldEnvironment parentEnvironment, java.util.Map<java.lang.String,java.lang.Object> arguments, SelectionSetContainer selectionSetContainer, TraverserContext<Node> traverserContext, GraphQLSchema schema)
-
-
Method Detail
-
getSchema
public GraphQLSchema getSchema()
- Specified by:
getSchema
in interfaceQueryVisitorFieldEnvironment
- Returns:
- the graphql schema in play
-
getField
public Field getField()
- Specified by:
getField
in interfaceQueryVisitorFieldEnvironment
- Returns:
- the current Field
-
getFieldDefinition
public GraphQLFieldDefinition getFieldDefinition()
- Specified by:
getFieldDefinition
in interfaceQueryVisitorFieldEnvironment
-
getParentType
public GraphQLOutputType getParentType()
- Specified by:
getParentType
in interfaceQueryVisitorFieldEnvironment
- Returns:
- the parent output type of the current field.
-
getParentEnvironment
public QueryVisitorFieldEnvironment getParentEnvironment()
- Specified by:
getParentEnvironment
in interfaceQueryVisitorFieldEnvironment
-
getArguments
public java.util.Map<java.lang.String,java.lang.Object> getArguments()
- Specified by:
getArguments
in interfaceQueryVisitorFieldEnvironment
-
getSelectionSetContainer
public SelectionSetContainer getSelectionSetContainer()
- Specified by:
getSelectionSetContainer
in interfaceQueryVisitorFieldEnvironment
-
getFieldsContainer
public GraphQLFieldsContainer getFieldsContainer()
- Specified by:
getFieldsContainer
in interfaceQueryVisitorFieldEnvironment
- Returns:
- the unmodified fields container fot the current type. This is the unwrapped version of
QueryVisitorFieldEnvironment.getParentType()
It is eitherGraphQLObjectType
orGraphQLInterfaceType
. because these are the onlyGraphQLFieldsContainer
-
isTypeNameIntrospectionField
public boolean isTypeNameIntrospectionField()
- Specified by:
isTypeNameIntrospectionField
in interfaceQueryVisitorFieldEnvironment
- Returns:
- true if the current field is __typename
-
getTraverserContext
public TraverserContext<Node> getTraverserContext()
- Specified by:
getTraverserContext
in interfaceQueryVisitorFieldEnvironment
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-