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 ExecutableNormalizedFieldexecutableNormalizedFieldprivate java.lang.StringfullyQualifiedNameprivate java.lang.StringqualifiedNameprivate GraphQLSchemaschemaprivate DataFetchingFieldSelectionSetselectionSet
-
Constructor Summary
Constructors Modifier Constructor Description privateSelectedFieldImpl(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.StringbeforeLastSlash(java.lang.String name)booleanequals(java.lang.Object o)java.lang.StringgetAlias()java.util.Map<java.lang.String,java.lang.Object>getArguments()java.util.List<GraphQLFieldDefinition>getFieldDefinitions()java.lang.StringgetFullyQualifiedName()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.intgetLevel()java.lang.StringgetName()java.util.List<java.lang.String>getObjectTypeNames()java.util.List<GraphQLObjectType>getObjectTypes()SelectedFieldgetParentField()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.StringgetQualifiedName()The selected field has a simple qualified name which is the path of field names to it.java.lang.StringgetResultKey()The result key is either the field query alias OR the field name in that preference orderDataFetchingFieldSelectionSetgetSelectionSet()GraphQLOutputTypegetType()inthashCode()booleanisConditional()private SelectedFieldmkParent(ExecutableNormalizedField executableNormalizedField)java.lang.StringtoString()
-
-
-
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:
getNamein interfaceSelectedField- Returns:
- the simple name of the selected field
-
getQualifiedName
public java.lang.String getQualifiedName()
Description copied from interface:SelectedFieldThe selected field has a simple qualified name which is the path of field names to it. For example `payments/amount`.- Specified by:
getQualifiedNamein interfaceSelectedField- Returns:
- the simple qualified name of the selected field
-
getFullyQualifiedName
public java.lang.String getFullyQualifiedName()
Description copied from interface:SelectedFieldThe 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:
getFullyQualifiedNamein interfaceSelectedField- Returns:
- the fully qualified name of the selected field
-
getFieldDefinitions
public java.util.List<GraphQLFieldDefinition> getFieldDefinitions()
- Specified by:
getFieldDefinitionsin interfaceSelectedField- Returns:
- the field runtime definition
-
getType
public GraphQLOutputType getType()
- Specified by:
getTypein interfaceSelectedField- Returns:
- the type of this field
-
getObjectTypes
public java.util.List<GraphQLObjectType> getObjectTypes()
- Specified by:
getObjectTypesin interfaceSelectedField- Returns:
- the object types of this SelectedField
-
getObjectTypeNames
public java.util.List<java.lang.String> getObjectTypeNames()
- Specified by:
getObjectTypeNamesin interfaceSelectedField- Returns:
- The list of all object types
-
getArguments
public java.util.Map<java.lang.String,java.lang.Object> getArguments()
- Specified by:
getArgumentsin interfaceSelectedField- Returns:
- a map of the arguments to this selected field
-
getLevel
public int getLevel()
- Specified by:
getLevelin interfaceSelectedField- Returns:
- the level of the selected field within the query
-
isConditional
public boolean isConditional()
- Specified by:
isConditionalin interfaceSelectedField- Returns:
- whether the field is conditionally present.
-
getAlias
public java.lang.String getAlias()
- Specified by:
getAliasin 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:SelectedFieldThe result key is either the field query alias OR the field name in that preference order- Specified by:
getResultKeyin interfaceSelectedField- Returns:
- the result key of the selected field
-
getParentField
public SelectedField getParentField()
Description copied from interface:SelectedFieldThis 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:
getParentFieldin interfaceSelectedField- Returns:
- the fields selected parent or null if there is not one
-
getSelectionSet
public DataFetchingFieldSelectionSet getSelectionSet()
- Specified by:
getSelectionSetin interfaceSelectedField- Returns:
- a sub selection set (if it has any)
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-