kobylynskyi / graphql-java-codegen

Make your GraphQL Java application schema-driven.
https://kobylynskyi.github.io/graphql-java-codegen/
MIT License
269 stars 114 forks source link

Adding custom annotation to fields, like additional validation annotations #1523

Closed Andras-Csanyi closed 3 months ago

Andras-Csanyi commented 3 months ago

Is your feature request related to a problem? Please describe. I'd like to run my validation (BeanValidation) against the input types, but achieving this I need to be able to create the following:

public class ApplicationInput implements java.io.Serializable {

    private static final long serialVersionUID = 1L;

    @jakarta.validation.constraints.NotNull
    @jakarta.validation.constraints.NotBlank
    @jakarta.validation.constraints.Size(min = 1, max=255)
    private String id;
}

Describe the solution you'd like A clear and concise description of what you want to happen. A possible configuration:

<ApplicationInput>
  <id>
    jakarta.validation.constraints.NotBlank
    jakarta.validation.constraints.Size(min = 1, max=255)
  </id>
</ApplicationInput>

Describe alternatives you've considered

I am ok to contribute with this implementation if you find it valuable.

Andras-Csanyi commented 3 months ago

Found it!