org.eclipse.microprofile.graphql

## Annotation Type Source

    @Retention(value=RUNTIME)
     @Target(value=PARAMETER)
     @Documented
    public @interface Source

Extends a GraphQL type by adding an externally defined field, effectively enabling a graph to be assembled.
The GraphQL type which is extended is the GraphQL type corresponding to the Java type of the annotated method parameter.
The added field type can be a scalar or another GraphQL type, it's inferred from the method return type.
At runtime, injects the concerned source object (which type is the extended GraphQL type), thus allowing to use fields from it to resolve the added field.
Optionally, specifies the name and description of the added field in the extended GraphQL type. By default, the name of the added field is the name of the method.
For example, a user might annotate a method's parameter as such:

     public class CharacterService {
           @Inject TwitterService twitterService;

          @Query(value = "tweets")
         public List <Tweet > tweets(
                               @Source("tweetsForMe") Character character,
                               @Name("last") int last) {
              return twitterService.search(character.getName(), last);
         }
     }

Schema generation of this would result in a stanza such as:

     type Character {
        # Other fields ...
        tweetsForMe(last: Int): [Tweet]
     }

### Optional Element Summary

Optional Elements
`String` `name`

### Element Detail

#### name

    public abstract String name

Returns:
  the name of the added type in the extended GraphQL type.

Default:
  ""