Enum Class ApiRootInterfaceStrategy

java.lang.Object
java.lang.Enum<ApiRootInterfaceStrategy>
io.github.besi97.graphql.codegen.model.ApiRootInterfaceStrategy
All Implemented Interfaces:
Serializable, Comparable<ApiRootInterfaceStrategy>, Constable

public enum ApiRootInterfaceStrategy extends Enum<ApiRootInterfaceStrategy>
Strategy of how root API interface (Query/Mutation/Subscription) will be generated
  • Enum Constant Details

    • INTERFACE_PER_SCHEMA

      public static final ApiRootInterfaceStrategy INTERFACE_PER_SCHEMA
      Generate multiple super-interfaces for each graphql file. Takes into account apiNamePrefixStrategy. e.g.: OrderServiceQueryResolver.java, ProductServiceQueryResolver.java, etc. (in addition to separate interfaces for each query/mutation/subscription)
    • SINGLE_INTERFACE

      public static final ApiRootInterfaceStrategy SINGLE_INTERFACE
      Generate a single QueryResolver.java, MutationResolver.java, SubscriptionResolver.java for all graphqls (in addition to separate interfaces for each query/mutation/subscription)
    • DO_NOT_GENERATE

      public static final ApiRootInterfaceStrategy DO_NOT_GENERATE
      Do not generate super interface for GraphQL operations.
  • Method Details

    • values

      public static ApiRootInterfaceStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ApiRootInterfaceStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null