Annotation Type GraphQLConvertFrom


@Documented
@Retention(RUNTIME)
@Target(TYPE)
public @interface GraphQLConvertFrom
Hint about which Java interfaces represent this GraphQL interface or union. This is used to generate a conversion from the interfaces into this GraphQL type by other conversions that can be converted into something that matches this GraphQL type.

 @GraphQLInterface
 @GraphQLConvertFrom(JavaExampleInterface.class)
 interface GraphQLExampleInterface {
   ...
 }

 interface JavaExampleInterface {
   ...
 }

 @GraphQLObject
 class GraphQLExampleObject implements GraphQLExampleInterface {
   @GraphQLFactory
   public GraphQLExampleType(@GraphQLSource JavaExampleObject source) {
     ...
   }
 }

 class JavaExampleObject implements JavaExampleInterface {
 }
 
  • Required Element Summary

    Required Elements 
    Modifier and Type Required Element Description
    Class<?>[] value
    Classes that convert into this GraphQL interface or union.
  • Element Details

    • value

      Class<?>[] value
      Classes that convert into this GraphQL interface or union.
      Returns: