-
- All Implemented Interfaces:
public @interface GraphQLType
Can be used on any field to set the return type. The type name must match exactly to some additional type that was provided to the schema generator, or it will fail on building the schema.
Internally, the generator will check for this anntation first and just return a type reference with this name instead of running reflection on the Kotlin code. This means that you can use this annotation with any Kotlin return type. That does mean you could have runtime exceptions if the model you actually return doesn't match the GraphQL schema type.