graphql-kotlin icon indicating copy to clipboard operation
graphql-kotlin copied to clipboard

[Feature Request] Meta Annotation Support

Open F43nd1r opened this issue 2 years ago • 4 comments

Is your feature request related to a problem? Please describe. I want to create a meta annotation like this

@GraphQLIgnore
@Autowired
@Target(AnnotationTarget.VALUE_PARAMETER)
@Retention(AnnotationRetention.RUNTIME)
annotation class GraphQLAutowired

because we plan to use autowiring into arguments quite a bit. However, currently meta annotations for @GraphQLIgnore are not supported.

Describe the solution you'd like I'd like to see this library support meta annotations out of the box.

Describe alternatives you've considered If that is not possible, instead it would also help if there is a hook for getValidArguments.

F43nd1r avatar Sep 21 '22 14:09 F43nd1r

Hello, have you just using the combination of

@GraphQLIgnore
@Autowired

in your resolvers ? i guess the goal here is to be less verbose ?

samuelAndalon avatar Sep 21 '22 19:09 samuelAndalon

Yes, exactly. Meta annotations are pretty standard in spring for reducing code duplication, so I was a bit surprised to see it not working here.

I understand spring support is just an addon but maybe it's still possible to support it? Or provide the hook so we can do it ourselves?

F43nd1r avatar Sep 21 '22 21:09 F43nd1r

sounds good, will work on adding the annotation.

samuelAndalon avatar Sep 22 '22 14:09 samuelAndalon

Any progress on this?

F43nd1r avatar Apr 26 '23 06:04 F43nd1r