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 java.lang.Object implements SelectedField
-
-
Field Summary
Fields Modifier and Type Field Description private ExecutableNormalizedField
executableNormalizedField
private java.lang.String
fullyQualifiedName
private java.lang.String
qualifiedName
private GraphQLSchema
schema
private DataFetchingFieldSelectionSet
selectionSet
-
Constructor Summary
Constructors Modifier Constructor Description private
SelectedFieldImpl(java.lang.String simpleQualifiedName, java.lang.String fullyQualifiedName, ExecutableNormalizedField executableNormalizedField, GraphQLSchema schema)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.lang.String
beforeLastSlash(java.lang.String name)
boolean
equals(java.lang.Object o)
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()
int
hashCode()
boolean
isConditional()
private SelectedField
mkParent(ExecutableNormalizedField executableNormalizedField)
java.lang.String
toString()
-
-
-
Field Detail
-
qualifiedName
private final java.lang.String qualifiedName
-
fullyQualifiedName
private final java.lang.String fullyQualifiedName
-
selectionSet
private final DataFetchingFieldSelectionSet selectionSet
-
executableNormalizedField
private final ExecutableNormalizedField executableNormalizedField
-
schema
private final GraphQLSchema schema
-
-
Constructor Detail
-
SelectedFieldImpl
private SelectedFieldImpl(java.lang.String simpleQualifiedName, java.lang.String fullyQualifiedName, ExecutableNormalizedField executableNormalizedField, GraphQLSchema schema)
-
-
Method Detail
-
mkParent
private SelectedField mkParent(ExecutableNormalizedField executableNormalizedField)
-
beforeLastSlash
private java.lang.String beforeLastSlash(java.lang.String name)
-
getName
public java.lang.String getName()
- Specified by:
getName
in interfaceSelectedField
- Returns:
- the simple name of the selected field
-
getQualifiedName
public java.lang.String 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
public java.lang.String 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
public java.util.List<GraphQLFieldDefinition> getFieldDefinitions()
- Specified by:
getFieldDefinitions
in interfaceSelectedField
- Returns:
- the field runtime definition
-
getType
public GraphQLOutputType getType()
- Specified by:
getType
in interfaceSelectedField
- Returns:
- the type of this field
-
getObjectTypes
public java.util.List<GraphQLObjectType> getObjectTypes()
- Specified by:
getObjectTypes
in interfaceSelectedField
- Returns:
- the object types of this SelectedField
-
getObjectTypeNames
public java.util.List<java.lang.String> getObjectTypeNames()
- Specified by:
getObjectTypeNames
in interfaceSelectedField
- Returns:
- The list of all object types
-
getArguments
public java.util.Map<java.lang.String,java.lang.Object> 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
public java.lang.String getAlias()
- Specified by:
getAlias
in interfaceSelectedField
- Returns:
- the alias of the selected field or null if not alias was used
-
getResultKey
public java.lang.String 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
public SelectedField 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
public DataFetchingFieldSelectionSet getSelectionSet()
- Specified by:
getSelectionSet
in interfaceSelectedField
- Returns:
- a sub selection set (if it has any)
-
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
-
-