Skip to content

Commit

Permalink
Merge pull request #26 from nfl/interface_additional_info
Browse files Browse the repository at this point in the history
Added real interface java class info to GraphQLInterfaceType
  • Loading branch information
vaant authored Dec 13, 2017
2 parents 6d12cfc + afabddb commit e6dce74
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import com.nfl.glitr.registry.TypeRegistry;
import com.nfl.glitr.registry.datafetcher.query.batched.CompositeDataFetcherFactory;
import com.nfl.glitr.util.ReflectionUtil;
import graphql.language.InterfaceTypeDefinition;
import graphql.schema.*;

import java.lang.reflect.Method;
Expand Down Expand Up @@ -50,6 +51,7 @@ private GraphQLInterfaceType createInterfaceType(Class clazz) {

return newInterface()
.name(clazz.getSimpleName())
.definition(new InterfaceTypeDefinition(clazz.getCanonicalName()))
.description(ReflectionUtil.getDescriptionFromAnnotatedElement(clazz))
.typeResolver(typeRegistry)
.fields(fields)
Expand Down

0 comments on commit e6dce74

Please sign in to comment.