Class RecordValidation

java.lang.Object
no.sikt.graphitron.configuration.RecordValidation

public class RecordValidation extends Object
Configure generation of JOOQ record validation for generated mutations according to the Jakarta Bean Validation specification. This class allows for toggling validation and specifying the associated GraphQL schema error type.
  • Constructor Details

    • RecordValidation

      public RecordValidation()
    • RecordValidation

      public RecordValidation(boolean enabled, @Nullable @Nullable String schemaErrorType)
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Checks if the record validation is currently enabled.
      Returns:
      A boolean indicating whether record validation is enabled.
    • getSchemaErrorType

      public Optional<String> getSchemaErrorType()
      Retrieves the schema error type.
      Returns:
      An Optional containing the schema error type if present and validation is enabled, otherwise returns an empty Optional.