-
Notifications
You must be signed in to change notification settings - Fork 327
Open
Description
For a type with a boolean field as follows:
type Query {
userConfig: UserConfig!
}
type UserConfig {
allowed: Boolean!
}
GraphQL Java supports having a Java class with a isAllowed
method as the "getter".
public class UserConfig {
private final Boolean isAllowed;
public UserConfig(Boolean isAllowed) {
this.isAllowed = isAllowed;
}
public Boolean isAllowed() {
return isAllowed;
}
However, the SchemaMappingInspector
does not recognize the isAllowed
method. This is because it uses the CachedIntrospectionResults
from Spring Framework, which uses PropertyDescriptor
.
This works for getters
but not for is*
methods.
It will report an unmapped field:
Unmapped fields: {UserConfig=[allowed]}
Unmapped registrations: {}
Unmapped arguments: {}
Skipped types: []
The reason I think this might qualify as a bug is that GraphQL Java does support is*
methods.
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement