Class AbstractGraphQLOptions

java.lang.Object
org.brapi.schematools.core.options.AbstractGeneratorSubOptions
org.brapi.schematools.core.graphql.options.AbstractGraphQLOptions
All Implemented Interfaces:
Options, Validatable
Direct Known Subclasses:
AbstractGraphQLQueryOptions, CreateMutationOptions, DeleteMutationOptions, SingleQueryOptions, UpdateMutationOptions

public abstract class AbstractGraphQLOptions extends AbstractGeneratorSubOptions
Provides general options for the generation of Endpoints
  • Constructor Details

    • AbstractGraphQLOptions

      public AbstractGraphQLOptions()
  • Method Details

    • validate

      public Validation validate()
      Description copied from class: AbstractGeneratorSubOptions
      Checks if the current options are valid, return a list of errors if the options are not valid
      Specified by:
      validate in interface Validatable
      Overrides:
      validate in class AbstractGeneratorSubOptions
      Returns:
      a Validation object than can be used queried to find if the options are valid and any errors if the options are not valid
    • override

      public void override(AbstractGraphQLOptions overrideOptions)
      Overrides the values in this Options Object from the provided Options Object if they are non-null
      Parameters:
      overrideOptions - the options which will be used to override this Options Object
    • getNameFor

      public final String getNameFor(@NonNull @NonNull String name)
      Gets the name of the query or mutation for a specific primary model
      Parameters:
      name - the name of the primary model
      Returns:
      the name of the query or mutation for a specific primary model
    • getNameFor

      public final String getNameFor(@NonNull @NonNull BrAPIType type)
      Gets the name of query or mutation for a specific primary model
      Parameters:
      type - the primary model
      Returns:
      the name of the query or mutation for a specific primary model
    • isPluralisingName

      public boolean isPluralisingName()
      Determines if the query or mutation should have a plurialised name
      Returns:
      true if the query or mutation should have a plurialised name, false otherwise