Netflix/dgs-framework

feature: Global Type Resolver

esfomeado opened this issue · 2 comments

Please read our contributor guide before
creating an issue. Also consider discussing your idea on
the discussion forum first.

Describe the Feature Request

As of now we have to add a @DGSTypeResolver for each type that we want to resolve.

If we have many types and they all behave the same way it becomes cumbersome to add a new one everytime we add a new interface/union.

Describe Preferred Solution

Allow somehow to costumize the default type resolver that uses the class name or provide one that is used as fallback.

Describe Alternatives

@esfomeado could you please share example code block that would explain the use of @DGSTypeResolver becoming cumbersome?

@mrvaruntandon Creating a single @DGSTypeResolver is not cumbersome.

The issue is that you have to create one per interface that you have. So if you have thousands of interfaces you have to create thousands of type resolvers.