Enigmatis / graphql-java-annotations

GraphQL Annotations for Java
Other
387 stars 97 forks source link

Autodetect GraphQL interfaces #237

Closed shevek closed 1 year ago

shevek commented 5 years ago

If an object implements an interface with GraphQL annotations on it, that interface should be autodetected and added to the schema.

@GraphQLTypeResolver(...)
public interface MyIF{}
public class Foo implements MyIF {}

annotations.additionalType(Foo.class);

Should detect MyIF, and does not.

Fgerthoffert commented 1 year ago

Hi @shevek,

We don't believe this is relevant (and this would introduce breaking changes), this annotation can be added directly added to your class explicitly (instead of auto-detecting).

Thanks