Class InputParser

java.lang.Object
no.sikt.graphitron.generators.context.InputParser

public class InputParser extends Object
A helper class for handling input type data for services and mutations. Order of fields is as follows: Basic non-reserved fields -> ordering field -> pagination fields -> context fields
  • Constructor Details

  • Method Details

    • getContextFieldNames

      public List<String> getContextFieldNames()
      Returns:
      List of all context input names that the field specifies.
    • getMethodInputNames

      public List<String> getMethodInputNames(boolean includeOrder, boolean includeForwardPagination, boolean includeContextFields)
      Returns:
      List of all input names that the field specifies.
    • getMethodInputBlocks

      public no.sikt.graphitron.javapoet.CodeBlocks getMethodInputBlocks(boolean includeOrder, boolean includeForwardPagination, boolean includeContextFields)
      Returns:
      List of all inputs that the field specifies as CodeBlocks.
    • getRecords

      public Map<String,InputField> getRecords()
      Returns:
      Map of inputs that the field specifies that correspond to any records.
    • getJOOQRecords

      public Map<String,InputField> getJOOQRecords()
      Returns:
      Map of inputs that the field specifies that correspond to jOOQ records.
    • hasRecords

      public boolean hasRecords()
      Returns:
      Are there any records among the inputs?
    • hasJOOQRecords

      public boolean hasJOOQRecords()
      Returns:
      Are there any jOOQ records among the inputs?.
    • getAllErrors

      public List<ObjectField> getAllErrors()
      Returns:
      List of all error types this operation has specified in the schema.
    • getValidationErrorException

      public Optional<ExceptionDefinition> getValidationErrorException()
      Returns:
      ExceptionDefinition used for validation errors. If it's configured and present in the schema as a returnable error for this operation.
    • getMethodParameterSpecs

      public List<no.sikt.graphitron.javapoet.ParameterSpec> getMethodParameterSpecs(boolean includeOrder, boolean includeForwardPagination, boolean includeContextFields)
    • getContextParameterSpecs

      public List<no.sikt.graphitron.javapoet.ParameterSpec> getContextParameterSpecs()