Package graphql.schema
Interface SelectedField
-
@PublicApi public interface SelectedField
ASelectedField
represents a field that occurred in a query selection set during execution and they are returned from using theDataFetchingFieldSelectionSet
interface returned viaDataFetchingEnvironment.getSelectionSet()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getAlias()
java.util.Map<java.lang.String,java.lang.Object>
getArguments()
java.util.List<GraphQLFieldDefinition>
getFieldDefinitions()
java.lang.String
getFullyQualifiedName()
The selected field has a more complex type qualified name which is the path of field names to it as well as the object type of the parent.int
getLevel()
java.lang.String
getName()
java.util.List<java.lang.String>
getObjectTypeNames()
java.util.List<GraphQLObjectType>
getObjectTypes()
SelectedField
getParentField()
This will return the parent of the selected field OR null if there is no single parent, it that field was a top level field OR the parent was a non concrete field.java.lang.String
getQualifiedName()
The selected field has a simple qualified name which is the path of field names to it.java.lang.String
getResultKey()
The result key is either the field query alias OR the field name in that preference orderDataFetchingFieldSelectionSet
getSelectionSet()
GraphQLOutputType
getType()
boolean
isConditional()
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- the simple name of the selected field
-
getQualifiedName
java.lang.String getQualifiedName()
The selected field has a simple qualified name which is the path of field names to it. For example `payments/amount`.- Returns:
- the simple qualified name of the selected field
-
getFullyQualifiedName
java.lang.String getFullyQualifiedName()
The selected field has a more complex type qualified name which is the path of field names to it as well as the object type of the parent. For example `[Invoice, Statement].payments/[Payment].amount`- Returns:
- the fully qualified name of the selected field
-
getObjectTypes
java.util.List<GraphQLObjectType> getObjectTypes()
- Returns:
- the object types of this SelectedField
-
getObjectTypeNames
java.util.List<java.lang.String> getObjectTypeNames()
- Returns:
- The list of all object types
-
getFieldDefinitions
java.util.List<GraphQLFieldDefinition> getFieldDefinitions()
- Returns:
- the field runtime definition
-
getType
GraphQLOutputType getType()
- Returns:
- the type of this field
-
getArguments
java.util.Map<java.lang.String,java.lang.Object> getArguments()
- Returns:
- a map of the arguments to this selected field
-
getLevel
int getLevel()
- Returns:
- the level of the selected field within the query
-
isConditional
boolean isConditional()
- Returns:
- whether the field is conditionally present.
-
getAlias
java.lang.String getAlias()
- Returns:
- the alias of the selected field or null if not alias was used
-
getResultKey
java.lang.String getResultKey()
The result key is either the field query alias OR the field name in that preference order- Returns:
- the result key of the selected field
-
getParentField
SelectedField getParentField()
This will return the parent of the selected field OR null if there is no single parent, it that field was a top level field OR the parent was a non concrete field.- Returns:
- the fields selected parent or null if there is not one
-
getSelectionSet
DataFetchingFieldSelectionSet getSelectionSet()
- Returns:
- a sub selection set (if it has any)
-
-