Describe the bug
Atlassian recently encountered a bug where the FieldVisibilitySchemaTransformation code seemed to produce and invalid schema after transformation.
To Reproduce
Right now we dont have a public reproduction yet but we dont have local .graphqls files of the starting schema and code like
override fun isVisible(environment: VisibleFieldPredicateEnvironment): Boolean {
if (schemaElement !is GraphQLFieldDefinition) {
return true
}
val parent = environment.parentElement as GraphQLFieldsContainer
val directiveContainer = (environment.schemaElement as GraphQLDirectiveContainer)
return when {
parent.name == "Query" && schemaElement.name == "admin_effectiveRoleAssignmentsByPrincipal"
-> false
parent.name == "Query" && schemaElement.name == "admin_group"
-> false
else -> true
}
}
I need to make sure we can publish the .graphqls schema ok here for reproduction