Package graphql.execution
Class NonNullableValueCoercedAsNullException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
graphql.GraphQLException
graphql.execution.NonNullableValueCoercedAsNullException
- All Implemented Interfaces:
GraphQLError
,Serializable
@PublicApi
public class NonNullableValueCoercedAsNullException
extends GraphQLException
implements GraphQLError
This is thrown if a non nullable value is coerced to a null value
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface graphql.GraphQLError
GraphQLError.Builder<B extends GraphQLError.Builder<B>>
-
Constructor Summary
ConstructorsConstructorDescriptionNonNullableValueCoercedAsNullException
(VariableDefinition variableDefinition, GraphQLType graphQLType) NonNullableValueCoercedAsNullException
(VariableDefinition variableDefinition, String causeMessage) NonNullableValueCoercedAsNullException
(VariableDefinition variableDefinition, String fieldName, GraphQLType graphQLType) NonNullableValueCoercedAsNullException
(VariableDefinition variableDefinition, String fieldName, List<Object> path, GraphQLType graphQLType) NonNullableValueCoercedAsNullException
(GraphQLArgument graphQLArgument) NonNullableValueCoercedAsNullException
(GraphQLInputObjectField inputTypeField) NonNullableValueCoercedAsNullException
(GraphQLInputObjectField inputTypeField, List<Object> path) NonNullableValueCoercedAsNullException
(GraphQLType graphQLType) NonNullableValueCoercedAsNullException
(String fieldName, List<Object> path, GraphQLType graphQLType) -
Method Summary
Modifier and TypeMethodDescriptiongetPath()
The graphql spec says that the (optional) path field of any error must be a list of path entries starting at the root of the response and ending with the field associated with the error https://spec.graphql.org/draft/#sec-Errors.Error-Result-FormatMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface graphql.GraphQLError
getExtensions, getMessage, toSpecification
-
Constructor Details
-
NonNullableValueCoercedAsNullException
public NonNullableValueCoercedAsNullException(VariableDefinition variableDefinition, GraphQLType graphQLType) -
NonNullableValueCoercedAsNullException
public NonNullableValueCoercedAsNullException(VariableDefinition variableDefinition, String fieldName, GraphQLType graphQLType) -
NonNullableValueCoercedAsNullException
public NonNullableValueCoercedAsNullException(VariableDefinition variableDefinition, String fieldName, List<Object> path, GraphQLType graphQLType) -
NonNullableValueCoercedAsNullException
-
NonNullableValueCoercedAsNullException
public NonNullableValueCoercedAsNullException(VariableDefinition variableDefinition, String causeMessage) -
NonNullableValueCoercedAsNullException
public NonNullableValueCoercedAsNullException(String fieldName, List<Object> path, GraphQLType graphQLType) -
NonNullableValueCoercedAsNullException
-
NonNullableValueCoercedAsNullException
public NonNullableValueCoercedAsNullException(GraphQLInputObjectField inputTypeField, List<Object> path) -
NonNullableValueCoercedAsNullException
-
-
Method Details
-
getLocations
- Specified by:
getLocations
in interfaceGraphQLError
- Returns:
- the location(s) within the GraphQL document at which the error occurred. Each
SourceLocation
describes the beginning of an associated syntax element
-
getPath
Description copied from interface:GraphQLError
The graphql spec says that the (optional) path field of any error must be a list of path entries starting at the root of the response and ending with the field associated with the error https://spec.graphql.org/draft/#sec-Errors.Error-Result-Format- Specified by:
getPath
in interfaceGraphQLError
- Returns:
- the path in list format
-
getErrorType
- Specified by:
getErrorType
in interfaceGraphQLError
- Returns:
- an object classifying this error
-