Interface SelectedField


@PublicApi public interface SelectedField
A SelectedField represents a field that occurred in a query selection set during execution and they are returned from using the DataFetchingFieldSelectionSet interface returned via DataFetchingEnvironment.getSelectionSet()
  • Method Details

    • getName

      String getName()
      Returns:
      the simple name of the selected field
    • getQualifiedName

      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

      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

      List<GraphQLObjectType> getObjectTypes()
      Returns:
      the object types of this SelectedField
    • getObjectTypeNames

      List<String> getObjectTypeNames()
      Returns:
      The list of all object types
    • getFieldDefinitions

      List<GraphQLFieldDefinition> getFieldDefinitions()
      Returns:
      the field runtime definition
    • getType

      Returns:
      the type of this field
    • getArguments

      Map<String,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

      String getAlias()
      Returns:
      the alias of the selected field or null if not alias was used
    • getResultKey

      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

      Returns:
      a sub selection set (if it has any)