Package graphql.schema
Class DataFetchingFieldSelectionSetImpl.SelectedFieldImpl
java.lang.Object
graphql.schema.DataFetchingFieldSelectionSetImpl.SelectedFieldImpl
- All Implemented Interfaces:
SelectedField
- Enclosing class:
DataFetchingFieldSelectionSetImpl
private static class DataFetchingFieldSelectionSetImpl.SelectedFieldImpl
extends Object
implements SelectedField
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ExecutableNormalizedField
private final String
private final String
private final GraphQLSchema
private final DataFetchingFieldSelectionSet
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SelectedFieldImpl
(String simpleQualifiedName, String fullyQualifiedName, ExecutableNormalizedField executableNormalizedField, GraphQLSchema schema) -
Method Summary
Modifier and TypeMethodDescriptionprivate String
beforeLastSlash
(String name) boolean
getAlias()
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()
getName()
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.The selected field has a simple qualified name which is the path of field names to it.The result key is either the field query alias OR the field name in that preference ordergetType()
int
hashCode()
boolean
private SelectedField
mkParent
(ExecutableNormalizedField executableNormalizedField) toString()
-
Field Details
-
qualifiedName
-
fullyQualifiedName
-
selectionSet
-
executableNormalizedField
-
schema
-
-
Constructor Details
-
SelectedFieldImpl
private SelectedFieldImpl(String simpleQualifiedName, String fullyQualifiedName, ExecutableNormalizedField executableNormalizedField, GraphQLSchema schema)
-
-
Method Details
-
mkParent
-
beforeLastSlash
-
getName
- Specified by:
getName
in interfaceSelectedField
- Returns:
- the simple name of the selected field
-
getQualifiedName
Description copied from interface:SelectedField
The selected field has a simple qualified name which is the path of field names to it. For example `payments/amount`.- Specified by:
getQualifiedName
in interfaceSelectedField
- Returns:
- the simple qualified name of the selected field
-
getFullyQualifiedName
Description copied from interface:SelectedField
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`- Specified by:
getFullyQualifiedName
in interfaceSelectedField
- Returns:
- the fully qualified name of the selected field
-
getFieldDefinitions
- Specified by:
getFieldDefinitions
in interfaceSelectedField
- Returns:
- the field runtime definition
-
getType
- Specified by:
getType
in interfaceSelectedField
- Returns:
- the type of this field
-
getObjectTypes
- Specified by:
getObjectTypes
in interfaceSelectedField
- Returns:
- the object types of this SelectedField
-
getObjectTypeNames
- Specified by:
getObjectTypeNames
in interfaceSelectedField
- Returns:
- The list of all object types
-
getArguments
- Specified by:
getArguments
in interfaceSelectedField
- Returns:
- a map of the arguments to this selected field
-
getLevel
public int getLevel()- Specified by:
getLevel
in interfaceSelectedField
- Returns:
- the level of the selected field within the query
-
isConditional
public boolean isConditional()- Specified by:
isConditional
in interfaceSelectedField
- Returns:
- whether the field is conditionally present.
-
getAlias
- Specified by:
getAlias
in interfaceSelectedField
- Returns:
- the alias of the selected field or null if not alias was used
-
getResultKey
Description copied from interface:SelectedField
The result key is either the field query alias OR the field name in that preference order- Specified by:
getResultKey
in interfaceSelectedField
- Returns:
- the result key of the selected field
-
getParentField
Description copied from interface:SelectedField
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.- Specified by:
getParentField
in interfaceSelectedField
- Returns:
- the fields selected parent or null if there is not one
-
getSelectionSet
- Specified by:
getSelectionSet
in interfaceSelectedField
- Returns:
- a sub selection set (if it has any)
-
equals
-
hashCode
public int hashCode() -
toString
-