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
I would like to generate a type as an interface that has parameterized fields, without using separate field resolvers for the parameterized fields. Since the type is being generated as an interface rather than a concrete class, I would expect the getter methods for the parameterized fields to be properly parameterized. However, there are no such parameters on the getters for the parameterized fields, and the generated interface is invalid/unusable.
Steps to Reproduce
Excerpt of relevant graphql schema:
"used with typesAsInterfaces config"
directive @asInterface on OBJECT
"used with fieldsWithResolvers config"
directive @noResolver on FIELD_DEFINITION
type Foo @asInterface {
simpleField: String!
parameterizedField(count: Int!): String! @noResolver
}
public interface Foo {
@javax.validation.constraints.NotNull
String getSimpleField();
// missing parameter here
@javax.validation.constraints.NotNull
String getParameterizedField();
}
This interface is unusable/broken. In addition to being unable to implement the method in terms of its parameters, this is not even valid for graphql kickstart:
Failed to instantiate [graphql.kickstart.tools.SchemaParser]: Factory method 'schemaParser' threw exception; nested exception is graphql.kickstart.tools.resolver.FieldResolverError: No method found as defined in schema :216 with any of the following signatures (with or without one of [interface graphql.schema.DataFetchingEnvironment] as the last argument), in priority order:
Related to #859
Java implementation was done as part of #913
What's missing is the implementation for Scala and Kotlin
Original description from #859
The text was updated successfully, but these errors were encountered: