ResolveType
Returns the typename of the given obj
This is used for polymorphic types to return the correct __typename depending on the runtime type of obj
. This function must return a non-null String for any Kotlin instance that represents a GraphQL type that implements an interface or is part of a union.
Example:
when (it) {
is Product -> "Product"
}
Content copied to clipboard
Returns the name of the GraphQL type for this runtime instance or null if this runtime instance is not found, which will trigger a GraphQL error.