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
Hello,
I think a regression has been added with the 0.12.4 release
Using the below models, on 0.12.3 I get the following schema:
typeAnotherModel {
id: Long
}
"Mutation root"typeMutation {
createMappingGroup(arg0: SomeModelInputInput): SomeModel
}
"Query root"typeQuery {
mappingGroup: SomeModel
}
typeSomeModel {
anotherModels: [AnotherModel]
id: Int
}
"A 64-bit signed integer"scalarLonginputAnotherModelInputInput {
id: Long
}
inputSomeModelInputInput {
anotherModels: [AnotherModelInputInput]
id: Int
}
However, using the same models on 0.12.4, I get an error during schema generation:
Exception in thread "main" java.lang.IllegalArgumentException: Conflicting setter definitions for property "anotherModels": dev.aga.model.SomeModelInput#setAnotherModels(java.util.Set) vs dev.aga.model.SomeModelInput#setAnotherModelInputs(java.util.List)
Is the @GraphQLIgnore no longer being applied, or is there something else going on?
Oof. This is a catch 22 type of situation. In earlier versions, SPQR had its own logic for detecting bean property elements (related field, getter, setter, constructor parameter), which was causing problems. Version 0.12.4 more directly delegates to Jackson to detect these elements, which it then filters based on its own inclusion rules (e.g. skip elements with @GraphQLIgnore). And here Jackson detects a conflict and throws an exception before SPQR even gets a chance to filter the ignored element out. As a quick workaround, you can add @JsonIgnore as that will make Jackson skip the element and avoid the conflict altogether. And I'll see how to improve @GraphQLIgnore handling to prevent conflicts like this...
Hello,
I think a regression has been added with the 0.12.4 release
Using the below models, on 0.12.3 I get the following schema:
However, using the same models on 0.12.4, I get an error during schema generation:
Is the
@GraphQLIgnore
no longer being applied, or is there something else going on?The text was updated successfully, but these errors were encountered: