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
{{ message }}
Repository navigation
Impossible to update description by directive #738
I am trying to somehow mark fields that have applied directive
@Component
classAuthDirective {
@Bean
funauthDirectiveWiring() =SchemaDirective("auth", AuthDirectiveWiring())
innerclassAuthDirectiveWiring : SchemaDirectiveWiring {
overridefunonField(environment:SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition>): GraphQLFieldDefinition {
val requiredScopes = environment.appliedDirective.getArgument("scopes").getValue<List<String>>()
val field = environment.fieldDefinition
// some logic with environment.codeRegistry.dataFetcher and scopes checkval originalDescription =if (field.description.isNullOrBlank()) ""else"${field.description}\n\n"val description ="${originalDescription}@auth(${requiredScopes})"// transform rerturns new field definition with new description, but original definition in registry still has old descriptionreturn field.transform {
it.description(description)
}
}
}
}
but later on this line my changed field definition is just thrown out
Activity