@PublicApi public class ExecutableNormalizedOperation extends java.lang.Object
ExecutableNormalizedOperation represent how the text of a graphql operation (sometimes known colloquially as a query)
will be executed at runtime according to the graphql specification. It handles complex mechanisms like merging
duplicate fields into one and also detecting when the types of a given field may actually be for more than one possible object
type.
An operation consists of a list of ExecutableNormalizedFields in a parent child hierarchy
| Constructor and Description |
|---|
ExecutableNormalizedOperation(OperationDefinition.Operation operation,
java.lang.String operationName,
java.util.List<ExecutableNormalizedField> topLevelFields,
com.google.common.collect.ImmutableListMultimap<Field,ExecutableNormalizedField> fieldToNormalizedField,
java.util.Map<ExecutableNormalizedField,MergedField> normalizedFieldToMergedField,
java.util.Map<ExecutableNormalizedField,QueryDirectives> normalizedFieldToQueryDirectives,
com.google.common.collect.ImmutableListMultimap<FieldCoordinates,ExecutableNormalizedField> coordinatesToNormalizedFields,
int operationFieldCount,
int operationDepth) |
public ExecutableNormalizedOperation(OperationDefinition.Operation operation, java.lang.String operationName, java.util.List<ExecutableNormalizedField> topLevelFields, com.google.common.collect.ImmutableListMultimap<Field,ExecutableNormalizedField> fieldToNormalizedField, java.util.Map<ExecutableNormalizedField,MergedField> normalizedFieldToMergedField, java.util.Map<ExecutableNormalizedField,QueryDirectives> normalizedFieldToQueryDirectives, com.google.common.collect.ImmutableListMultimap<FieldCoordinates,ExecutableNormalizedField> coordinatesToNormalizedFields, int operationFieldCount, int operationDepth)
public OperationDefinition.Operation getOperation()
public java.lang.String getOperationName()
public int getOperationFieldCount()
ExecutableNormalizedFields are in the operation.public int getOperationDepth()
public com.google.common.collect.ImmutableListMultimap<FieldCoordinates,ExecutableNormalizedField> getCoordinatesToNormalizedFields()
ExecutableNormalizedField maps to a one or more field coordinate in the schemapublic java.util.List<ExecutableNormalizedField> getTopLevelFields()
ExecutableNormalizedFields in this operation.public com.google.common.collect.ImmutableListMultimap<Field,ExecutableNormalizedField> getFieldToNormalizedField()
Field to ExecutableNormalizedFieldpublic java.util.List<ExecutableNormalizedField> getNormalizedFields(Field field)
ExecutableNormalizedFields given a Field AST element in the operationfield - the field to look upExecutableNormalizedFields that represent that fieldpublic java.util.Map<ExecutableNormalizedField,MergedField> getNormalizedFieldToMergedField()
ExecutableNormalizedField to MergedFieldspublic MergedField getMergedField(ExecutableNormalizedField executableNormalizedField)
MergedField given a ExecutableNormalizedFieldexecutableNormalizedField - the field to use the keyMergedField or null if its not presentpublic java.util.Map<ExecutableNormalizedField,QueryDirectives> getNormalizedFieldToQueryDirectives()
ExecutableNormalizedField to its QueryDirectivespublic QueryDirectives getQueryDirectives(ExecutableNormalizedField executableNormalizedField)
QueryDirectives associated with the given ExecutableNormalizedFieldexecutableNormalizedField - the executable normalised field in questionpublic ExecutableNormalizedField getNormalizedField(MergedField mergedField, GraphQLFieldsContainer fieldsContainer, ResultPath resultPath)
ExecutableNormalizedField given a merged field and a result path. If this does not find a field it will assert with an exceptionmergedField - the merged fieldfieldsContainer - the containing type of that fieldresultPath - the result path in play