-
- All Implemented Interfaces:
-
java.io.Serializable
public final class InvalidInputFieldTypeException extends GraphQLKotlinException
GraphQL Interfaces and Unions cannot be used as arguments. Specification reference: https://facebook.github.io/graphql/draft/#sec-Field-Arguments
This specification is translated as following: the type of a function argument cannot be a java / kotlin interface.
Example of invalid use cases:
class InvalidQuery { fun invalidInterfaceUsage (arg: AnInterface): String = arg.value
fun invalidUnionUsage (arg: UnionMarkup): Int = arg.property
}
interface AnInterface { val value: String }
data class AnImplementation ( override val value: String = "something" ) : AnInterface
interface UnionMarkup
data class PartOfUnion( val property: Int) : UnionMarkup
-
-
Constructor Summary
Constructors Constructor Description InvalidInputFieldTypeException(KParameter kParameter)
-
Method Summary
Modifier and Type Method Description Throwable
getCause()
String
getMessage()
-
Methods inherited from class java.lang.Exception
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
InvalidInputFieldTypeException
InvalidInputFieldTypeException(KParameter kParameter)
-
-
Method Detail
-
getMessage
String getMessage()
-
-
-
-