You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@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.
Now that DGS is integrated with Spring GraphQL is possible to create a GraphQlSourceBuilderCustomizer and set a default type resolver like for instance a ClassNameTypeResolver.
The issue is that DGS on DgsGraphQLSourceBuilder doesn´t do anything with this type resolver. Check for instance the DefaultSchemaResourceGraphQLSourceBuilder, there they set the default type resolver on the runtimeWiring as expected.
The same should be possible on DGS. This way I could set a default type resolver and get rid of the @DGSTypeResolver
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
The text was updated successfully, but these errors were encountered: