@PublicApi public class ExecutionStepInfo extends java.lang.Object
The static graphql type system (rightly) does not contain a hierarchy of child to parent types nor the nonnull ness of type instances, so this helper class adds this information during query execution.
Modifier and Type | Class and Description |
---|---|
static class |
ExecutionStepInfo.Builder |
Modifier and Type | Method and Description |
---|---|
ExecutionStepInfo |
changeTypeWithPreservedNonNull(GraphQLOutputType newType)
This allows you to morph a type into a more specialized form yet return the same
parent and non-null ness, for example taking a
GraphQLInterfaceType
and turning it into a specific GraphQLObjectType
after type resolution has occurred |
<T> T |
getArgument(java.lang.String name)
Returns the named argument
|
java.util.Map<java.lang.String,java.lang.Object> |
getArguments() |
MergedField |
getField()
This returns the AST fields that matches the
getFieldDefinition() during execution |
GraphQLFieldDefinition |
getFieldDefinition()
This returns the field definition that is in play when this type info was created or null
if the type is a root query type
|
ExecutionStepInfo |
getParent() |
ExecutionPath |
getPath() |
GraphQLOutputType |
getType()
This returns the type for the current step.
|
GraphQLOutputType |
getUnwrappedNonNullType()
This returns the type which is unwrapped if it was
GraphQLNonNull wrapped |
boolean |
hasParent() |
boolean |
isListType() |
boolean |
isNonNullType() |
static ExecutionStepInfo.Builder |
newExecutionStepInfo() |
static ExecutionStepInfo.Builder |
newExecutionStepInfo(ExecutionStepInfo existing) |
java.lang.String |
simplePrint() |
java.lang.String |
toString() |
ExecutionStepInfo |
transform(java.util.function.Consumer<ExecutionStepInfo.Builder> builderConsumer) |
public GraphQLOutputType getType()
public GraphQLOutputType getUnwrappedNonNullType()
GraphQLNonNull
wrappedpublic GraphQLFieldDefinition getFieldDefinition()
public MergedField getField()
getFieldDefinition()
during executionpublic ExecutionPath getPath()
ExecutionPath
to this infopublic boolean isNonNullType()
public boolean isListType()
public java.util.Map<java.lang.String,java.lang.Object> getArguments()
public <T> T getArgument(java.lang.String name)
T
- you decide what type it isname
- the name of the argumentpublic ExecutionStepInfo getParent()
public boolean hasParent()
public ExecutionStepInfo changeTypeWithPreservedNonNull(GraphQLOutputType newType)
GraphQLInterfaceType
and turning it into a specific GraphQLObjectType
after type resolution has occurrednewType
- the new type to bepublic java.lang.String simplePrint()
public java.lang.String toString()
toString
in class java.lang.Object
public ExecutionStepInfo transform(java.util.function.Consumer<ExecutionStepInfo.Builder> builderConsumer)
public static ExecutionStepInfo.Builder newExecutionStepInfo()
public static ExecutionStepInfo.Builder newExecutionStepInfo(ExecutionStepInfo existing)